Rama
Rama

Reputation: 875

UIAutomator Viewer of Android SDK returns blank screenshot

I am new to Mobile automation testing using Android SDK , Appium.

Test Environment:- Win-7, Android version 4.2.2

Steps that I followed :-

  1. Connected the Android device version 4.2.2 using adb by commend

adb devices

  1. Navigate to folder C:\Users\android-sdks\tools and launched UIAutomatorviewer

  2. click on "Device Screenshot" button of uiautomatorviewer

Instead of showing the connected mobile device screen it's returning the blank screenshot .

enter image description here

Upvotes: 3

Views: 1950

Answers (3)

Rama
Rama

Reputation: 875

There many reason for this, Please take care of below points to make

  1. your Emulator/Device is of below version 4.4 and sdk's >=19
  2. check you device is connected to adb server by running command on Cmd adb devices . Verify the device is listed
  3. UIAutomator takes a simple screenshot of screen. So if screen saver is ON. means if your device screen get blank. then you click on "Device Screenshot". then the same blank image is return on UIautomator.
  4. Some time UIAutomator is not fetch screen shot of your device. Try once again. It will work.

Upvotes: 1

user1999758
user1999758

Reputation: 94

your SDK is not compatible with any one of the required JARS or Supportive software UIAutomator is not a separate one.. it will comes in your SDK suite.

Upvotes: 1

karthick23
karthick23

Reputation: 1331

It was an old bug for SDk's <=18. try to use Emulator/Device above 4.4 and recommend to use sdk's >=19

https://code.google.com/p/android/issues/detail?id=60359

Upvotes: 0

Related Questions