How to get Xpath in chrome that is same as Selenium XPath in FireFox
33,619
Look at the source. In chrome right click on the element and click inspect element it will open the source in developer console and then you can right click on the source of the element and get the xpath using copyxpath which you can use to find element.
And xpaths are same nothing to do with chrome or firefox.
Author by
Raj Discussion
Updated on November 27, 2022Comments
-
Raj Discussion over 1 year
I have a web application which is open only in Chrome (not in Firefox and IE). I want to automate this application using Selenium, but there is no selenium recorder support for chrome.
How can I get Xpath in chrome same as Selenium XPath in FireFox
-
Saifur about 9 yearsYou need selenium
webDriver
not ide.XPath
has nothing to do with this -
Raj Discussion about 9 yearsBut there is no selenium recorder support for chrome and my application is not open in firefox. How can I record actions
-
Helping Hands about 9 yearsNo way..selenium webdriver is only an option.
-
Raj Discussion about 9 yearsI am OK write tests manually but is there any way to get control properties which can help to identify control in chrome with selenium.
-
Helping Hands about 9 yearsYes if you use selenium webdriver then you will be able to find any element in any browser.
-
Raj Discussion about 9 yearsYes I can find element but how do I know on which properties do I use to find element
-
Helping Hands about 9 yearsMeans? can you give me example?
-
Helping Hands about 9 yearsusing selenium web driver , you can find element by ID , class , xpath , css selector and some others..
-