How to validate an xpath on Appium for Android?

Hi , I am using Appium v1.4.16.1 . I would like to know if there is any method to validate an xpath written. For example , in Firefox we have an addon (Firepath) to validate our xpaths .

So there are a couple options I use…

  1. If you use the UI “Desktop” version of Appium, it has an inspector that you can enter xpath and other locator strategies into and will highlight the page when it finds it. You might want to try Appium 1.5.3 or the newest Appium Desktop 1.6.

  2. What I do now is just put a breakpoint in my test code where the page is being displayed and play around with setting different xpath values in the debugger and evaluating them that way.

Good luck!

@Mainaks0290 I suggest to use ARC approach ( REPL ) Refer to section “Elements Locator Strategy”

New Appium Desktop doesn’t yet have locator checking feature like the old one, but I’ve already filed issue for that and in upcoming builds it should be available.