0

I am trying to automate android app. On click of one button, user is redirected on browser page to login.

Note - I am automating android app, not any web application

Q - How to identify elements and locators to automate login in mobile browser[chrome]?

Environment - Mac + Android + java + appium

2 Answers 2

1

First you have to search the package name of the application and the Main activity name of the application where you want to launch / open / run at the android device.

So in you case web browsers package name will be "com.android.chrome"(default page name for chrome browser.) ->use this command:adb shell dumpsys meminfo

Then the activity name using below command; adb shell dumpsys window windows. And the activity name will be "org.chromium.chrome.browser.ChromeTabbedActivity".

Now use your selenium scripting skills to navigate to a web page and do the actions. Its same as selenium.

0

If you have installed Android SDK in eclipse, you will find uiautomatorviewer in sdk folders. This will take the screenshot of the app and from there you can identify the elements. To use uiautimatorviewer click here!

1
  • Thanks But I am not willing to identify element from Android screen, I am looking for element present on browser my friend :( Sep 27, 2016 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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