Hi all,
Is it possible to check a value in advanced properties of object in Element Browser? For example, I need to check the 'Text' value from the following object property (look at the attachment for details).
Thanks.
How to access Advanced Properties of object
How to access Advanced Properties of object
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: How to access Advanced Properties of object
Hello marasanov,
Just add the tracked element to your repository. Drag it to the action table and choose “Validation”: Finally, choose the desired attribute (MatchName) and set the expected value (MatchValue):
Regards,
Robert
Just add the tracked element to your repository. Drag it to the action table and choose “Validation”: Finally, choose the desired attribute (MatchName) and set the expected value (MatchValue):
Regards,
Robert
You do not have the required permissions to view the files attached to this post.
Re: How to access Advanced Properties of object
Hi Robert,
Unfortunately, this doesn't work for me. When I add validation step, I can't choose the properties that I need. These are the options that it offers me:
I need to access to properties from 'Element Browser -> Browser & Results -> Advanced tab'. You can take a look at the image that I attached in my first post - for example, I would like to access the following properties: Text, Variable and Size.
Unfortunately, this doesn't work for me. When I add validation step, I can't choose the properties that I need. These are the options that it offers me:
I need to access to properties from 'Element Browser -> Browser & Results -> Advanced tab'. You can take a look at the image that I attached in my first post - for example, I would like to access the following properties: Text, Variable and Size.
You do not have the required permissions to view the files attached to this post.
Re: How to access Advanced Properties of object
First, is the application open and the NumField visible when you try to select the attribute to match? If not, Ranorex will not be able to know what advanced fields are available.
Second, you can just type in the name of the attribute "Text" in the Match Name drop-down's text area. Ranorex only lists the attributes it can currently see, but you can type anything in there.
Second, you can just type in the name of the attribute "Text" in the Match Name drop-down's text area. Ranorex only lists the attributes it can currently see, but you can type anything in there.
Shortcuts usually aren't...
Re: How to access Advanced Properties of object
Did you try to get your attribute via usercode and the getAttributeValue method?
1. Create a Code- or Recording-module
2. drag and drop your repo-item into the modules usercode section
3. -->
var yourItem = <yourRepoInstance><yourRepoItem>
string yourValue = yourItem.getAttributeValue("Text").toString();
4. replace "Text" with the property RR-Spy offers you within the element browser
5. Make sure it is an "Element" you are working with (in your example it is), otherwise "getAttributeValue" won't work (IntelliSens will not offer getAttributeValue). In this case go for yourItem.ELEMENT.getAttributeValue(<youProperty>).toString();
1. Create a Code- or Recording-module
2. drag and drop your repo-item into the modules usercode section
3. -->
var yourItem = <yourRepoInstance><yourRepoItem>
string yourValue = yourItem.getAttributeValue("Text").toString();
4. replace "Text" with the property RR-Spy offers you within the element browser
5. Make sure it is an "Element" you are working with (in your example it is), otherwise "getAttributeValue" won't work (IntelliSens will not offer getAttributeValue). In this case go for yourItem.ELEMENT.getAttributeValue(<youProperty>).toString();
Re: How to access Advanced Properties of object
Thank you krstcs and bewiss. Both of your solutions work.