Access Inner Text with XPath

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
regex
Posts: 48
Joined: Tue Aug 14, 2012 5:47 pm

Access Inner Text with XPath

Post by regex » Fri Sep 21, 2012 10:02 pm

How do I get the inner text using XPath?

Code: Select all

.//div[#'path']/table/tbody/tr[2]/td[2]/iframe//div[#'path']/table/tbody/tr[2]/td[2]/div/div/strong[@innertext='124124']
I don't want it hardcored to this 124124 value. I want the object repository to map and grab whatever inner text is displayed.

Code: Select all

@innertext='*' 

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Access Inner Text with XPath

Post by Support Team » Mon Sep 24, 2012 3:01 pm

Hi,

You can use regular expressions in this case, the following expression should work for you:
@innertext~'.*'
, there is a section in our UserGuide which describes how to use regular expressions in the RxPath: RanoreXPath.

I hope this is what you want!

Regards,
Markus
Ranorex Support Team
.
Image