Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Selenium WebDriver Integration
Today at 1:06 pm by azharuddin

» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

How can I identify Xpath?

View previous topic View next topic Go down

How can I identify Xpath?

Post by Lucas66 on 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.

Lucas66

Posts : 2
Join date : 2012-07-31

Back to top Go down

Re: How can I identify Xpath?

Post by ashish_gangwar on 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.

ashish_gangwar

Posts : 5
Join date : 2012-08-06
Age : 40
Location : Noida

Back to top Go down

Re: How can I identify Xpath?

Post by mattA on Tue Aug 07, 2012 3:01 am

also you can install firepath for firebug and it lists xpaths for you Very Happy

mattA

Posts : 8
Join date : 2012-08-07

Back to top Go down

Re: How can I identify Xpath?

Post by sandeepqa on 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
sandeepqa

Posts : 3
Join date : 2012-08-03

Back to top Go down

Re: How can I identify Xpath?

Post by Lucas66 on Tue Aug 07, 2012 9:49 pm

Thanks so much everyone!

Lucas66

Posts : 2
Join date : 2012-07-31

Back to top Go down

Re: How can I identify Xpath?

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


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