innertext value that has multiple strong attribute

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

innertext value that has multiple strong attribute

Post by omayer » Sun May 20, 2012 2:11 pm

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
You do not have the required permissions to view the files attached to this post.
Tipu

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: innertext value that has multiple strong attribute

Post by Support Team » Sun May 20, 2012 4:23 pm

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

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: innertext value that has multiple strong attribute

Post by omayer » Mon May 21, 2012 4:25 am

Thank you Alex, found the solved by using expression
/strong[@innertext~'[0-9]']";
-Thank you,
Somayer
Tipu