Profile

Cover photo
84 followers|31,516 views
AboutPostsPhotosVideos

Stream

 
#Android  #culebra #calculator #automated #test
Do you find these videos useful?
1
Add a comment...

AndroidViewClient

Shared publicly  - 
 
Culebra: new tool coming to AndroidViewClient toolbox.
Take a look at the preview documentation.
Comments are welcome.
 
2
2
Yang Linxin's profile photoAndroidViewClient's profile photoDiego Torres Milano's profile photoManikandan M's profile photo
13 comments
 
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 https://github.com/dtmilano/AndroidViewClient/issues?state=open, 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

Shared publicly  - 
 
AndroidViewClient: UiAutomator support Q&A

Q:
This question was posted at http://dtmilano.blogspot.ca/2012/11/androidviewclient-uiautomator-support.html

+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 dump.py, 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  


A:
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 https://github.com/dtmilano/AndroidViewClient/blob/master/AndroidViewClient/examples/dump.py
2
1
Matheus Sousa Faria's profile photoAndroidViewClient's profile photoSantosh Patel's profile photoDiego Torres Milano's profile photo
27 comments
 
Its working exactly as expected. Thanks a lot for such a prompt reply and fix. Was not at all expecting for such a quick fix.
Add a comment...

AndroidViewClient

Shared publicly  - 
 
(Copied from dtmilano.blogspot.com)
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?
Thanks 
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...
1
1
Manasa Muchchatti's profile photoAndroidViewClient's profile photoNate Doyle's profile photoDiego Torres Milano's profile photo
20 comments
 
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...

AndroidViewClient

Shared publicly  - 
7
1
MPHO MOGAPI's profile photoAndrew Zellman's profile photoAndroidViewClient's profile photoRiccardo Ciovati's profile photo
16 comments
 
+MPHO MOGAPI,
What are you running?
It seems you are trying to run AndroidViewClient's tests, is that true?
Add a comment...
In their circles
86 people
Have them in circles
84 people
Gert Vervoort's profile photo
Sung-hwan Jang (jangc)'s profile photo
Durai Raj's profile photo
Suresh KL's profile photo
Florin Buda's profile photo
Otto K's profile photo
yashaswini's profile photo
Diego Torres Milano's profile photo
Luis Vasconcelos's profile photo

AndroidViewClient

Shared publicly  - 
 
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.
1
AndroidViewClient's profile photopierre lalite's profile photoDiego Torres Milano's profile photo
9 comments
 
You are right, it seems the problem is related to sending events.
Add a comment...

AndroidViewClient

Shared publicly  - 
 
 
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 (http://semver.org/)
- Added tests
- Updated documentation
View original post
3
AndroidViewClient's profile photoReal Lau's profile photo
3 comments
 
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 "LoginMMViewClient.py", line 11, in <module>
    device, serialno = ViewClient.connectToDeviceOrExit()
  File "/mnt/sdcard/AndroidViewClient/src/com/dtmilano/android/viewclient.py", line 1436, in connectToDeviceOrExit
    device = adbclient.AdbClient(serialno)
  File "/mnt/sdcard/AndroidViewClient/src/com/dtmilano/android/adb/adbclient.py", line 89, in _init_
    self.__connect()
  File "/mnt/sdcard/AndroidViewClient/src/com/dtmilano/android/adb/adbclient.py", 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...

AndroidViewClient

Shared publicly  - 
1
Xia Wang's profile photoDiogo Bilkes's profile photosreenadh somala's profile photoDiego Torres Milano's profile photo
9 comments
 
Install Linux (even in a VM) don't suffer from this silly Windows problems and be happy ;-)
Add a comment...

AndroidViewClient

Shared publicly  - 
 
If you are running AndroidViewClient's examples from Eclipse you need this directories in PYTHONPATH in project properties: 
1
Add a comment...

AndroidViewClient

Shared publicly  - 
 
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:

vc.findViewByIdOrRaise('id/button').touch()
1
Sören Wellge's profile photoRyan Reed's profile photoAndroidViewClient's profile photo
8 comments
 
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...
Story
Tagline
Monkeyrunner extension