Find locators(id,xpath..) using Macaca inspector

Dharma
1 min readMay 26, 2021

--

XPath is a locator which is used to automate the web and mobile application. not only XPath we can use id, XPath name, text..etc.

But it doesn’t have any unique locator we go for XPath. To find XPath for the web applications we have so many plugins like Firebug, Fire path, Selector hub, and all. But for the mobile application only appium inspector was there, that also only for iOS.

Now we got one more tool to find XPath for both android and iOS applications.

Macaca Inspector

For Macaca inspector first thing you should be installed NodeJS

Then need to install Macaca Inspector with the following command

$ npm i app-inspector -g

Next, you have to connect your android/ios device(for android ADB setup has to be done) and run the below command to start Macaca inspector.

app-inspector -u <device uid>

The above command starts a local server and launch the appium inspector with a connected device view.

Navigate to the application screen and refresh the page to load the view on the browser. Click on the tree structure of the layout and you can find all the properties of element. Xpath also will be there..

appium inspector

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response