I am working on a project in which automation is done using Appium Tool. I felt it difficult to track the XPath of an Image or Textbox in Eclipse while scripting. Sometimes the XPath will be given as a Trial and Error method.

So is there any way to track the XPath easily or wisely from Eclipse?

  • Just an additional note if you are going to be using xpath a lot, XPath abbreviated syntax will help you keep your code cleaner: w3.org/TR/xpath-30/#abbrev Dec 11 '13 at 19:33
  • You seem to be only getting answers about Firefox. I don't use Eclipse. I turned up a few things like gibert.jp.free.fr/projects/eclipse/plugins/xpathfinder on searching, but as I haven't used them can't evaluate them.
    – testerab
    Dec 22 '13 at 10:20
  • All above way are representing the way to find out Xpath of webpage elements. How to find the xpath of element on real mobile device connected?
    – user6942
    Feb 8 '14 at 11:50

You can press F12 key in chrome and right click on the element you want to get and click on inspect element. Now you shall see the console with corresponding attributes,Now right click at the console will give you required xpath.

Also Firebug an adddon of mozilla is helpful


Try to use Firebug + Firepath plugins for Mozilla Firefox. It makes getting locators easier.

  • 5
    I think the OP is specifically looking for something in Eclipse.
    – corsiKa
    Oct 23 '13 at 15:51

You can use xpath finder - Firefox plugin!!! Just right click on the element and select "View xpath".

  • 1
    Senthil you mentioned that is a Firefox plugin but the question specifically asked for an Eclipse solution. Is Xpath Finder available in Eclipse?
    – Francis
    Dec 12 '13 at 18:36
  • Senthil - can you expand on this answer a little bit. Perhaps include a screen shot or and example of what you get out of it?
    – Dan Snell
    Dec 21 '13 at 20:12
  • 1
    Hi @Senthil, welcome to SQA. I agree with Francis, the question is quite specific about Eclipse (and there are plugins for Eclipse specifically).
    – testerab
    Dec 22 '13 at 10:24

Generally speaking, you won't use Eclipse directly for a task like this. If you are writing automated tests using a tool like Appium or Selenium, you will likely want to open the app under test in a mainstream browser such as Chrome or Firefox. Firefox seems to be the more popular choice for development/testing, so I'd recommend that.

If you are testing a mobile web app, I'd still recommend opening it up in a desktop browser using Firefox since the tools are pretty good already. You can run tests in whatever environment makes sense, but you should consider developing tests using a mainstream browser like Firefox or Chrome.

To identify elements you would like to locate using xpath queries or otherwise, use the Firebug extension as noted in other answers.


I recommend firefinder with firebug. Because firepath in some cases follows universal selector, That is not time efficient.

  • I am using appium tool for automating a mobile application.So is it possible to get the x-path of an element from Firebug for a Mobile Application?
    – Baburaj V
    Oct 24 '13 at 4:37

enter image description here

Landed here when looking for the answer but figured out myself and thought someone would benefit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.