1

Upon typing xpath in fire-path text field, if x-path is correct then it'll display the corresponding HTML code. It was working fine previously.

But now it's not displaying the corresponding HTML code even though the xpath is correct.

Can anyone help me to find the solution for this problem? I even uninstalled fire-path and installed again but still, it's not working.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
joy
  • 111
  • 1
  • 3
  • 10

2 Answers2

1

If you visit the GitHub Page of FirePath, it clearly mentions:

FirePath is a Firebug extension that adds a development tool to edit, inspect and generate XPath expressions and CSS3 Selectors

Now if you visit the home page of FireBug, it clearly mentions that :

The Firebug extension isn't being developed or maintained any longer. We invite you to use the Firefox DevTools instead, which ship with Firebug.next

So the direction is clear that we have to use DevTools [F12] which comes integrated with the Mozilla Firefox 56.x + releases onwards.


Example Usage :

Now, let us assume we have to identify the of the Search Box on Google Home Page.

  1. Open Mozilla Firefox 56.x browser and browse to the url https://www.google.co.in

  2. Press F12 to open the DevTools

  3. Within the DevTools section, on the Inspector tab, use the Inspector to identify the Search Box WebElement.

  4. Copy the xpath (absolute) and paste it in a text pad.

  5. Construct a logical unique xpath.

  6. Within the DevTools section, on the Console tab, within JS sub menu, paste the logical unique xpath you have constructed in the following format and hit Enter or Return as follows:

    $x("logical_unique_xpath_of_search_box")
    
  7. The WebElement identified by the xpath will be reflected.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
0

The new version of Firefox is not supporting firebug.

You can use chrome dev tools if you like so.

I personally writing XPath using chrome dev tools

For more info refer my answer here

Is there a way to get the xpath in google chrome?

Shubham Jain
  • 16,610
  • 15
  • 78
  • 125