I am trying to access the element wwhich has path which ends as " /text[@accessiblevalue='0.000001']"
but at run time the the accessiblevalue changes and it throws exception in finiding the path.
Problem in accessing the element
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Problem in accessing the element
Hi,
It seems that this is a dynamic attribute which changes after each restart of your AUT.
So you have to find a unique attribute to identify the element.
Are there any other attributes available for the element?
For more information please have a look at the following links:
http://www.ranorex.com/support/user-gui ... xpath.html
http://www.ranorex.com/blog/ranorexpath-tips-and-tricks
http://www.ranorex.com/blog/eliminate-d ... norexpaths
Regards,
Markus
Ranorex Support Team
It seems that this is a dynamic attribute which changes after each restart of your AUT.
So you have to find a unique attribute to identify the element.
Are there any other attributes available for the element?
For more information please have a look at the following links:
http://www.ranorex.com/support/user-gui ... xpath.html
http://www.ranorex.com/blog/ranorexpath-tips-and-tricks
http://www.ranorex.com/blog/eliminate-d ... norexpaths
Regards,
Markus
Ranorex Support Team
-
- Posts: 20
- Joined: Tue Sep 20, 2011 7:12 am
Re: Problem in accessing the element
how to write a regular expression to find numbers like 0.00001 or 56.
so at run time it will find that element.
i am doing like this Text txt=@ " .../text[@accessiblevalue='[0-9]*'] "
is this correct if not plz correct it.
so at run time it will find that element.
i am doing like this Text txt=@ " .../text[@accessiblevalue='[0-9]*'] "
is this correct if not plz correct it.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Problem in accessing the element
Hi,
your RanoreXPath holding the reg exp should look something like this:
/text[@accessiblevalue~'^[0-9]+\.?[0-9]*$']
http://www.ranorex.com/support/user-gui ... html#c3294
Regards,
Tobias
Support Team
your RanoreXPath holding the reg exp should look something like this:
/text[@accessiblevalue~'^[0-9]+\.?[0-9]*$']
- ^ ... starts with
- [0-9]+ ... a digit one or more times
- \.? ... a "." zero or one times
- [0-9]* ... a digit zero or more times
- $ ... ends with
http://www.ranorex.com/support/user-gui ... html#c3294
Regards,
Tobias
Support Team
-
- Posts: 20
- Joined: Tue Sep 20, 2011 7:12 am
Re: Problem in accessing the element
thanx a lot this solved my problem... 
