GHOST
GHOST

Reputation: 463

automate android app without id [appium]

Our dev team released app. I am inspecting it with monitor (android studio tool) and try to find id but there is no id or anything how can i automate this app?

Please find below, attached sample screen shots:

enter image description here

enter image description here

without id i have no idea how to automate? if there are any ways to automate this app let me know.

Upvotes: 0

Views: 371

Answers (1)

Bill Hileman
Bill Hileman

Reputation: 2836

XPath locator for the e-mail element (untested):

//android.widget.TextView[contains(text(), 'Email')]/preceding-sibling::android.widget.EditText

This locates the textview following the editview based on the text value, then points to the preceding sibling.

Same idea with the button, but just use the textview itself:

//android.widget.TextView[contains(text(), 'Log in')]

Also untested, but I believe both should work.

Upvotes: 1

Related Questions