Hello
I'm trying to retrieve the Textvalue of a Container in the Usercode.
But i'm not able to access the "text" Attribute for the ContainerContentElement.
I think there should be a solution for this , which i've not found out yet.
Greetings Bokido
Retrieve Textvalue from Container
Retrieve Textvalue from Container
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Retrieve Textvalue from Container
Hi,
Do you know the name of the attribute where the text is saved to?
If yes you can try to use the following method:
Regards,
Markus
Ranorex Support Team
Do you know the name of the attribute where the text is saved to?
If yes you can try to use the following method:
ContentElement.Element.GetAttributeValue("yourAttribute").ToString();By the way please update to the actual Ranorex 3.2.2 version, here is the link.
Regards,
Markus
Ranorex Support Team
Re: Retrieve Textvalue from Container
Hi
No i don't.
The recorded item is a Textbox and as usual there should be a attribute which is named "Text" with the text of the Textbox but there isn't. So i guess there must be another Attribute.
Greetings Bokido
No i don't.
The recorded item is a Textbox and as usual there should be a attribute which is named "Text" with the text of the Textbox but there isn't. So i guess there must be another Attribute.
Greetings Bokido
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Retrieve Textvalue from Container
Hi,
Maybe the text attribute is not available through your UIAutomation implementation, therefore please check if you can get the text with UISpy, which is a Microsoft tool and should identify all attributes if the UIA implementation is correct.
Is UISpy able to get the right text value?
Regards,
Markus
Ranorex Support Team
Can you ask your developers if they know which attribute/property holds the specific text value?No i don't.
Maybe the text attribute is not available through your UIAutomation implementation, therefore please check if you can get the text with UISpy, which is a Microsoft tool and should identify all attributes if the UIA implementation is correct.
Is UISpy able to get the right text value?
Regards,
Markus
Ranorex Support Team
Re: Retrieve Textvalue from Container
Hi,
I just found out a method to retrieve the value.
Text textTextBox = "/dom[@caption='Microsoft Silverlight']/body/div/object/form/tabpagelist[@automationid='TabControlContentArea']/tabpage/text[8]";
string textboxvalue = textTextBox.TextValue;
with the following part i was able to get the Value of the right ContainerContentElement.
Greetings Bokido
I just found out a method to retrieve the value.
Text textTextBox = "/dom[@caption='Microsoft Silverlight']/body/div/object/form/tabpagelist[@automationid='TabControlContentArea']/tabpage/text[8]";
string textboxvalue = textTextBox.TextValue;
with the following part i was able to get the Value of the right ContainerContentElement.
Greetings Bokido