0

Hello I am new to appium. I want to know that how can I use UIautomator in appium to detect an element. Please help me how to do that.

joe
  • 15
  • 1
  • 5

3 Answers3

1

You can use android 'uiautomatorviewer' which acts same as the Appium Inspector. "uiautomatorviewer" is a GUI tool using which you can view the UI components of any android application.

To access uiautomatorviewer:

  1. Go to the directory where android-sdk is installed.
  2. Under android-sdk -> tools -> click on uiautomatorviewer.
  3. You will find a green icon for 'device screenshot' which will take a snapshot of the current active screen of your device:

enter image description here

Smriti
  • 1,552
  • 3
  • 15
  • 29
  • Note that `uiautomatorview` has moved from `/tools` to `/tools/bin` And if you can't find your `` you can use Android Studio to help you as explained [here](https://stackoverflow.com/a/34532235/857209) – Glenn Lawrence Apr 22 '20 at 11:04
0

Internally Appium use UIAutomator you don't need to use use it.

You can follow link "How to setup appium

Thanks Sadik

Community
  • 1
  • 1
Sadik Ali
  • 1,129
  • 10
  • 26
0

If you go to android SDK>tools>UIAutomator. Make sure device is connected, tap on green button on top left side. This will take the screenshot of your current screen on the device. This way you can point mouse on the screen to detect elements.

Gaurav
  • 1,332
  • 11
  • 22