uiautomatorviewer

5,828 views
Skip to first unread message

Jazz

unread,
Nov 19, 2012, 5:52:53 AM11/19/12
to calabash...@googlegroups.com
Hi,

How to use the uiautomatorviewer command to view the UI of the andoid app?

I have followed the below method: 


  • Connect your Android device to your development machine
  • Open a terminal window and navigate to <android-sdk>/tools/
  • Run the tool with this command:
    $ uiautomatorviewer
But i dont get the UI Automator Window opened.
Instead get an error saying,

D:\TC\Programme\android-sdk\tools>uiautomatorviewer
The command "uiautomatorviewer" is misspelled or
could not be found.

Anybody have an idea?

Thanks in advance,
Jazz

Jazz

unread,
Nov 19, 2012, 8:27:23 AM11/19/12
to calabash...@googlegroups.com
Hi,

I could open the uiautomatorviewer window.. But cant take a screenshot.
It says,
"Unable to connect to adb.Check if adb is installed correctly".
Attached the screenshot.
Anybody know the solution?

Thanks,
Jazz
ss.png

Jonas Maturana Larsen

unread,
Nov 19, 2012, 3:32:26 PM11/19/12
to calabash...@googlegroups.com
Does adb work from your command line?

Are you aware that uiautomatorviewer is part of ADT and not part of calabash?
You might have more luck by asking questions at http://stackoverflow.com/

- Jonas

Tester T

unread,
Nov 19, 2012, 3:36:02 PM11/19/12
to calabash...@googlegroups.com
I have followed the below method: 


  • Connect your Android device to your development machine
  • Open a terminal window and navigate to <android-sdk>/tools/
  • Run the tool with this command:
    $ uiautomatorviewer

Cannot take the Screenshot with uiautomatorviewer.

Please find the attachment too.
I get the shown cmd window when i open the uiautomationviewer & the error popup when i click screenshot.
I wanted to add a note.. The message in cmd says,
"The System cannot find the path"..

I am using Windows 7 and the device is Samsung Galaxy Nexus (Android version 4.1.2). I have not installed my app yet. 
My "Developer Options" is set to ON. My "USB Debugging" and "Protect USB Storage" is also selected.

Have an idea?

Thanks in advance,
Jazz
ss.png

Yulia Mittova

unread,
Nov 21, 2012, 4:31:17 AM11/21/12
to calabash...@googlegroups.com
I have the same problem. And I use Nexus and Win 7 too. And I can run "adb" from my command line without any errors.

вторник, 20 ноября 2012 г., 3:36:05 UTC+7 пользователь Jazz написал:

Tester T

unread,
Nov 21, 2012, 4:53:08 PM11/21/12
to calabash...@googlegroups.com
Hi Julia 

Please inform me too when you find a solution. I will also let you know.

Aduait Pokhriyal

unread,
Dec 15, 2012, 4:06:23 AM12/15/12
to calabash...@googlegroups.com
As mentioned at http://developer.android.com/tools/testing/testing_ui.html

To use the uiautomator and uiautomatorviewer tools, you must have the following versions of the Android development tools installed:

  • Android SDK Tools, Revision 21 or higher
  • Android SDK Platform, API 16 or higher
Update Android SDK Tools to revision 21 and Android SDK Platform-tools to revision 16 from Android SDK Manager.
You will get uiautomatorviewer.bat in your \android-sdk\tools directory.
Then you can run the uiautomatorviewer.

Hope this will help.

Vikash Singh

unread,
Jan 11, 2013, 12:46:05 AM1/11/13
to calabash...@googlegroups.com
Hi,

I want to know the use of xml and screenshots taken by uiautomatorviewer tool,
I mean is there any way to compare two xml file by any tool, to validate screen components.

Thanks in advance.

Dhanush DP

unread,
Sep 21, 2015, 3:16:03 AM9/21/15
to calabash-android
Hi Jazz,

3 years late, but can you update as to how you fixed the 'unable to connect to adb' issue back then, please?


On Monday, 19 November 2012 16:22:53 UTC+5:30, Jazz wrote:
Reply all
Reply to author
Forward
0 new messages