Page 1 of 1

innertext value that has multiple strong attribute

Posted: Sun May 20, 2012 2:11 pm
by omayer
How do i get the innertext that has same element id - i am trying to get the this value [@innertext='1640737']

code -
WebElement elem ="/dom[@page='xx.cfm']/body/table[2]/tbody/tr/td[2]/table/tbody/tr/td[2]/table[2]/tbody/tr/td[@id='TD11']/strong";
_contactId = elem.InnerText;

----- element returned "Public" but i am trying to retreived '1640737'
innerText.jpg

Re: innertext value that has multiple strong attribute

Posted: Sun May 20, 2012 4:23 pm
by Support Team
The element you are trying to get is the second "strong" element, right? Why not just use an index?
See the User Guide for more info:
http://www.ranorex.com/support/user-gui ... xpath.html
omayer wrote:beginner
You are using Ranorex for longer than a year now, right? Do you really think that you are still a beginner? :wink:

Regards,
Alex
Ranorex Team

Re: innertext value that has multiple strong attribute

Posted: Mon May 21, 2012 4:25 am
by omayer
Thank you Alex, found the solved by using expression
/strong[@innertext~'[0-9]']";
-Thank you,
Somayer