XPath

Ask general questions here.
yinghu
Posts: 26
Joined: Thu Oct 25, 2012 5:48 pm

XPath

Post by yinghu » Thu Oct 25, 2012 6:08 pm

Hi there,

I have a question about xpath.
I am recording buttons in a list table. I got the button's xpath like:
/dom[@domain='c2.auto.schoolwires.net']//a[#'btnEdit']/span[@innertext='Edit']
But I want to get xpath like:
/dom[@domain='c2.auto.schoolwires.net' and @caption~'^Automation\ Top\ Site\ Site\ ']/body/div[@id='dialog-overlay-WindowXLargeModal-base']/div/div[@id='dialog-overlay-WindowXLargeModal-body']/div/div[2]/div[@id='appmanager-pnl-moduleinstancedetail']/div/div[2]/div[1]/a[@title='Edit my app.']/span[@innertext='Edit'].

I am a newbie about Ranorex. So I don't know how to get it when I recording. Like absolute xpath. Is there any settings I need to do?

Thanks.

yinghu

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: XPath

Post by Ciege » Fri Oct 26, 2012 5:01 pm

Hi yinghu,

First, one post in the forums for the same question should suffice... You shouldn't post the same question 3 times...

Second, that is called the "unique ID" feature... This post from the forum should help: http://www.ranorex.com/forum/object-xpa ... t3491.html
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

yinghu
Posts: 26
Joined: Thu Oct 25, 2012 5:48 pm

Re: XPath

Post by yinghu » Fri Oct 26, 2012 10:41 pm

Thanks for your help!

Ciege wrote:Hi yinghu,

First, one post in the forums for the same question should suffice... You shouldn't post the same question 3 times...

Second, that is called the "unique ID" feature... This post from the forum should help: http://www.ranorex.com/forum/object-xpa ... t3491.html