Page 1 of 1

Dynamic attributes

Posted: Tue Sep 06, 2016 3:07 pm
by Juan
Hi all. Is there anyway to obtain attributes from Dynamic? I know I can find items by dynamic attributes, but in C#, once I have the control, I want my method to return the name value from dynamic, how can I access that attribute? I can for example return the class by control.As<WebElement>().class but with Dynamic is not working

Re: Dynamic attributes

Posted: Thu Sep 08, 2016 9:45 am
by Langrisser
hy Juan,

since, I am unable to post url, you can look for GetAttributeValueText Method (name) in Ranorex.Core.Element

You can get the value by passing your desired attribute, e.g. "name" to get the value "Hazards"

Re: Dynamic attributes

Posted: Fri Sep 09, 2016 12:27 pm
by asdf
Hi Juan,

In order to get the dynamic name, I would recommend using the GetValue-action in Ranorex Studio.
Therefore, just add a new GetValue-action, choose the attribute you want to get ('name' in your case) and drag & drop the regarded repository element in there.

If this explanation is not clear enough, please post a snapshot of your application under test, in order to further analyze this.

I hope I could help.

Kind regards,
asdf