joe
joe

Reputation: 15

How to use UIAutomator in appium

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.

Upvotes: 0

Views: 6210

Answers (3)

Smriti
Smriti

Reputation: 1592

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

Upvotes: 1

Gaurav
Gaurav

Reputation: 1370

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.

Upvotes: 0

Sadik Ali
Sadik Ali

Reputation: 1195

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

You can follow link "How to setup appium

Thanks Sadik

Upvotes: 0

Related Questions