MonkeyRunner and androidviewclient “dump-all-windows-lib.py” example is not working #34

Open
salamatiehsan opened this Issue Jun 30, 2013 · 3 comments

Comments

Projects
None yet
2 participants

I'm running dump-all-windows-lib.py example, but it keeps showing this error:

windows = vc.list()
File "/Users/ehsan/Desktop/Android/adt-bundle-mac-x86_64-20130514/sdk/tools/androidviewclient-2.3.24.jar/com/dtmilano/android/viewclient$py.class", line 1864, in list
Exception: Not implemented yet: listing windows with UiAutomator
I can run other examples but I don't know what is the problem. and this is how I run the example:

monkeyrunner -plugin androidviewclient-2.3.24.jar dump-all-windows-lib.py
Thanks in advance...

Owner

dtmilano commented Jul 1, 2013

Well, it's running and telling you that list has not been implemented yet for UiAutomator back-end, mainly because UiAutomator has no list windows.

There are at least two workarounds:

  • forcing the use of ViewServer (see dump -F|--force-view-server-use)
  • use dumpsys window windows to obtain the list of windows

Furthermore, you may not need the list of all windows in the system to dump all Views in your application, just use -1 as the window ID.

Thanks for the answer, I want to have the whole GUI tree of my application not just the current activity which is showing in emulator. Can you help me with that with a sample code or something. I will really appreciate that. I am totally new to monkeyrunner and androidviewclient:)

Owner

dtmilano commented Jul 1, 2013

dump will show what's on the screen, so you may have to start your
activities and get the dump then.

On Mon, Jul 1, 2013 at 9:39 AM, salamatiehsan notifications@github.comwrote:

Thanks for the answer, I want to have the whole GUI tree of my application
not just the current activity which is showing in emulator. Can you help me
with that with a sample code or something. I will really appreciate that. I
am totally new to monkeyrunner and androidviewclient:)


Reply to this email directly or view it on GitHubhttps://github.com/dtmilano/AndroidViewClient/issues/34#issuecomment-20282025
.

Have you read my blog ?
http://dtmilano.blogspot.com
android junit tests ui linux cult thin clients

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment