Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
Lucas66
Posts : 2
Join date : 2012-07-31

How can I identify Xpath? Empty How can I identify Xpath?

Sat Aug 04, 2012 2:04 am
I just started with Selenium. In QTP we can use SPY to identify an object in browser such as button, table, radio, edit field, weblist, etc… I do not know what we can use in Selenium to identify (or locate) Xpath (e.g. driver.findElement(By.xpath("//div[@id='contentContainer']/map/area[2]")).click()Wink. Can anyone tell me? Thanks in advance.
avatar
ashish_gangwar
Posts : 5
Join date : 2012-08-06
Age : 47
Location : Noida

How can I identify Xpath? Empty Re: How can I identify Xpath?

Mon Aug 06, 2012 5:30 pm
Following 2 ways you can use.
1. Install a "add on" "FireBug" to your Firefox Mozilla browser then after launching the URL you can do InspectElement.
2. Open Selenium IDE and go to recording mode with the correct URL in its "Base URL". Launch the application (under testing) then manually click on the objects you want to get xPath of. Stop the recording. In IDE, select the line for the object and then see the list of properties (xPath, ID etc.) from the dropdown list of the "Target list".

Please let me know if you have any difficulty in doing so.
avatar
mattA
Posts : 8
Join date : 2012-08-07

How can I identify Xpath? Empty Re: How can I identify Xpath?

Tue Aug 07, 2012 3:01 am
also you can install firepath for firebug and it lists xpaths for you Very Happy
sandeepqa
sandeepqa
Posts : 3
Join date : 2012-08-03

How can I identify Xpath? Empty Re: How can I identify Xpath?

Tue Aug 07, 2012 5:41 pm
XPath generator, editor, inspector and simple extraction tool. Since FF3, it requires DOM inspector plug-in .
•URL to Add:
addons.mozilla.org/en-US/firefox/addon/1192
–Click Add to Firefox
–Select XPather and Press Install Now button
–Press Restart Firefox Now button.
avatar
Lucas66
Posts : 2
Join date : 2012-07-31

How can I identify Xpath? Empty Re: How can I identify Xpath?

Tue Aug 07, 2012 9:49 pm
Thanks so much everyone!
Sponsored content

How can I identify Xpath? Empty Re: How can I identify Xpath?

Back to top
Permissions in this forum:
You cannot reply to topics in this forum