Cover photo
86 followers|30,401 views


#Android  #culebra #calculator #automated #test
Do you find these videos useful?
Add a comment...
Culebra: new tool coming to AndroidViewClient toolbox.
Take a look at the preview documentation.
Comments are welcome.
Diogo Bilkes's profile photoYang Linxin's profile photoAndroidViewClient/culebra's profile photo
Thanks for your comment.
Can you provide a specific test case I can reproduce?
Android API version?
Locale settings?
Other relevant info?

If you are reporting a bug, it's better to create it at, so they can be tracked accordingly.

Comments, questions, suggestions, and any other stuff related directly or indirectly with AndroidViewClient/Culebra is better here at Google+.
Add a comment...
AndroidViewClient: UiAutomator support Q&A

This question was posted at

+keenos said...
Hi Diego,

I've been attempting to use findViewById('id/idName')

but have been failing. I have access to the source code and know that the activity I'm loading should have the view with android:id="@+id/idName" but I continue to get an exception.

When I run, I see that all my views on the page have ids similar to id/no_id/#

Does this mean I lose idName as a way to identify my view and have to use id/no_id/# instead? Is there something I'm missing here?
30 January, 2013 17:33  

One of the drawbacks on using the UiAutomator backend is the lack of ids. AndroidViewClient tries to help you and provides you with alternative unique Ids, but sometimes what you want are the plain old Ids.
On certain occasions,  the advantages of UiAutomator outweigh these little nuisances, and in the future this will be the option to choose.

But for all the other cases, AndroidViewClient provides the forceviewserveruse argument in its constructor:

    vc = ViewClient(device, serialno, forceviewserveruse=True)

the use of ViewServer backend gives you backward compatibility and you will have the Ids for your Views.

This use is illustrated in
Santosh Patel's profile photoAndroidViewClient/culebra's profile photoAvinash Saraf's profile photo
Thanks..that helped...actually I was using espresso till now where I could get UI component through referring their id ..I switched to uiautomator and couldn't do the I thought maybe there must be a way...
But now u cleared my doubt... Thanks once again +AndroidViewClient/culebra​
Add a comment...
(Copied from
Jerry Chen has left a new comment on your post "AndroidViewClient: UiAutomator support": 

HI Milano,
I got this error very often when dump view:
Error executing command: uiautomator dump /mnt/sdcard/window_dump.xml

is there a better way to avoid this error?
Durairaj said... Hi Milano, I tried running the sample as it is, but I could not get it to work. I got the following error: Couldn't find button with text= Couldn't find button with text= Couldn't fin...
AndroidViewClient/culebra's profile photoNate Doyle's profile photo
That's good to know. I'm more concerned with getting this persistent problem fixed. I was trying to write my own script using yours as a guide but it didn't work. I'm hoping to learn some stuff from your book (shameless suck-up :D ). Not the solution to this problem... but something. :)
Add a comment...
This video explores one of the latest additions to culebra: multi-device test generation.
Are you using it?
I would like to hear your comments.
AndroidViewClient/culebra's profile photopierre lalite's profile photo
I add the method press() and type() for Monkey and also use Monkey when Forceviewserver is used with higher versions. All the tests are working fine for all versions. For other methods like drag() it can be done easy but I don't need it yet for the moment. For Forceviewserver case dump is slower than uiautomator but on the other hand further commands via socket to monkey is much much faster than "adb input shell".
Out of subject here, for the first part of my project, I am a little bit surprised than I must use Forceviewserver more than I think, because Uiautomator is not able to detect some imageview, and the only way to detect it is via ViewServer, but that is another story.
Add a comment...
AndroidViewClient/culebra version 3.0.0 released

Download if from github now!.

ViewClient.viewsById and ViewClient.getViewsById() consistently return dictionary of Views

- Version 3.0.0
- The use of ViewClient.viewsById and the associated method was not consistent across different backends and was corrected
- This release starts to use a more strict form of Semantic Versioning 2.0.0 (
- Added tests
- Updated documentation
AndroidViewClient/culebra's profile photoReal Lau's profile photo
Thanks for you reply,I use QPython run androidviewclient script on android device,when i got it runned,some errors throwed:

Traceback (most recent call last):
  File "", line 11, in <module>
    device, serialno = ViewClient.connectToDeviceOrExit()
  File "/mnt/sdcard/AndroidViewClient/src/com/dtmilano/android/", line 1436, in connectToDeviceOrExit
    device = adbclient.AdbClient(serialno)
  File "/mnt/sdcard/AndroidViewClient/src/com/dtmilano/android/adb/", line 89, in _init_
  File "/mnt/sdcard/AndroidViewClient/src/com/dtmilano/android/adb/", line 129, in __connect
    raise RuntimeError("ERROR: Connecting to %s:%d: %s.\nIs adb running on your computer?" % (self.socket, self.port, ex))
RuntimeError: ERROR: Connecting to <socket._socketobject object at 0x638ea5a8>:5037: [Errno 111] Connection refused.
Is adb running on your computer?

I need your help,look forward to your suggests.
Add a comment...
Xia Wang's profile photoDiogo Bilkes's profile photosreenadh somala's profile photoDiego Torres Milano's profile photo
Install Linux (even in a VM) don't suffer from this silly Windows problems and be happy ;-)
Add a comment...
If you are running AndroidViewClient's examples from Eclipse you need this directories in PYTHONPATH in project properties: 
Add a comment...
MPHO MOGAPI's profile photoAndrew Zellman's profile photoAndroidViewClient/culebra's profile photo
What are you running?
It seems you are trying to run AndroidViewClient's tests, is that true?
Add a comment...
Couldn't reproduce issue

Following up the issue reported by +Sören Wellge I created a full screen Activity that could show or hide the status bar and in both cases AndroidViewClient touched the button correctly. Touching the button the background color changes.
Also notice that intentionally I made the button really small to cover the hardest case.
Please provide some additional information or share the smallest Activity that you can create to reproduce the problem.

The script simply contains:

Ryan Reed's profile photoAndroidViewClient/culebra's profile photo
You should test with the latest version 2.1. I couldn't reproduce it.
Or it could be something in your script.
Add a comment...
Born as a monkeyrunner extension later became a pure python Android Test Automation solution