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. Copying xpath of element Your answer

And xpaths are same nothing to do with chrome or firefox.

Share:
33,619
Raj Discussion
Author by

Raj Discussion

Updated on November 27, 2022

Comments

  • Raj Discussion
    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
      Saifur about 9 years
      You need selenium webDriver not ide. XPath has nothing to do with this
    • Raj Discussion
      Raj Discussion about 9 years
      But there is no selenium recorder support for chrome and my application is not open in firefox. How can I record actions
    • Helping Hands
      Helping Hands about 9 years
      No way..selenium webdriver is only an option.
    • Raj Discussion
      Raj Discussion about 9 years
      I 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
      Helping Hands about 9 years
      Yes if you use selenium webdriver then you will be able to find any element in any browser.
    • Raj Discussion
      Raj Discussion about 9 years
      Yes I can find element but how do I know on which properties do I use to find element
    • Helping Hands
      Helping Hands about 9 years
      Means? can you give me example?
    • Helping Hands
      Helping Hands about 9 years
      using selenium web driver , you can find element by ID , class , xpath , css selector and some others..