tag:blogger.com,1999:blog-25456655.post1512926263975434175..comments2024-02-09T11:53:32.369-05:00Comments on Diego Torres Milano's blog: AndroidViewClient: Q&ADiego Torres Milanohttp://www.blogger.com/profile/12030778501784140349noreply@blogger.comBlogger37125tag:blogger.com,1999:blog-25456655.post-13843206538594193302013-02-27T18:21:48.074-05:002013-02-27T18:21:48.074-05:00@Tariq,
Thanks for your comments.
Unfortunately, ...@Tariq,<br />Thanks for your comments.<br /><br />Unfortunately, porting <b>AndroidViewClient</b> to Java is not in the roadmap yet. However being an <b>Open Source</b> project allows for somebody to do it. Of course, I will provide directions and help.<br /><br />Alternatively. if the feature is vital for your project, sponsoring it would allow me or somebody else to afford some time to work on it as it has been done before.<br />Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-48212741525789296292013-02-27T11:06:09.257-05:002013-02-27T11:06:09.257-05:00We have invested much time and effort on chimpchat...We have invested much time and effort on chimpchat & monkey runner using JAVA. Now this AndroidViewClient is no doubt an excellent tool which specially gives the ability to interact with UI very tightly (e.g click a button by its name(String)). But right now the drawback is we are missing AndroidViewClient JAVA support. We need the support for JAVA badly.Tariq Ghalibhttps://www.blogger.com/profile/14355811042382618478noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-17429656007187968332013-01-16T22:13:47.408-05:002013-01-16T22:13:47.408-05:00@Zellman,
ViewCient constructor (__init__()) takes...@Zellman,<br />ViewCient constructor (__init__()) takes at lease 2 arguments + self, so they are 3 in total.<br /><br /><b><br />class ViewClient:<br /> '''<br /> ViewClient is a I{ViewServer} client.<br /> <br /> If not running the ViewServer is started on the target device or emulator and then the port<br /> mapping is created.<br /> '''<br /><br /> def __init__(self, device, serialno, adb=None, autodump=True, forceviewserveruse=False, localport=VIEW_SERVER_PORT, remoteport=VIEW_SERVER_PORT, startviewserver=True):<br /></b><br /><br />You have to specify <b>device</b> and <b>serialno</b>.<br />Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-64753949246411538942013-01-16T20:05:08.297-05:002013-01-16T20:05:08.297-05:00Hi Diego,
Thanks for the blog posts, they have bee...Hi Diego,<br />Thanks for the blog posts, they have been very helpful.<br /><br />I imported AndroidViewClient, and I've hit an error that I'm not sure about. I never call __init__ in my script.<br /><br />130116 16:52:13.124:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOptions] Script terminated due to an exception<br />130116 16:52:13.124:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOptions]Traceback (most recent call last):<br /> File "/Users/zellman/monkeyrunner.py", line 47, in <br /> viewclient = ViewClient(device)<br /><b>TypeError: __init__() takes at least 3 arguments (2 given)</b><br /><br />130116 16:52:13.124:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOptions] at org.python.core.PyException.fillInStackTrace(PyException.java:70)<br />...<br />130116 16:52:13.124:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOptions] at com.android.monkeyrunner.ScriptRunner.run(ScriptRunner.java:116)<br />130116 16:52:13.124:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOptions] at com.android.monkeyrunner.MonkeyRunnerStarter.run(MonkeyRunnerStarter.java:77)<br />130116 16:52:13.124:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOptions] at com.android.monkeyrunner.MonkeyRunnerStarter.main(MonkeyRunnerStarter.java:189)<br />130116 16:52:13.130:I [MainThread] [com.android.chimpchat.ChimpManager] Monkey Command: quit.Zellmanhttps://www.blogger.com/profile/16813984358083397314noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-71685535713080476602012-10-31T14:32:11.042-04:002012-10-31T14:32:11.042-04:00@007,
Language selection is a personal preference....@007,<br />Language selection is a personal preference. Python is very expressive and creating the tests could be simple but if you have a large investment in Java you would probably want to leverage it a create all your tests using that language.<br /><br />Feel free to sponsor AndroidViewClient port to Java ;-)Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-29087358185766900762012-10-30T03:53:10.737-04:002012-10-30T03:53:10.737-04:00We have existing Java program where we would like ...We have existing Java program where we would like to use AndroidViewClient module with monkeyrunner. We feel that using only Java would be nice since we can use chimpchat already. What do you think would be now the best pratice ?007https://www.blogger.com/profile/04460784600003267020noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-34610117706929169122012-10-29T19:14:59.333-04:002012-10-29T19:14:59.333-04:00@007,
Strictly speaking it's possible to do wh...@007,<br />Strictly speaking it's possible to do what AndroidViewClient does in python directly from Java rewriting AndroidViewClient in Java using chimpchat.<br /><br />Why do you need it from Java?Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-80748910276709519542012-10-29T04:25:30.507-04:002012-10-29T04:25:30.507-04:00Typo. VC View Client moduleTypo. VC View Client module007https://www.blogger.com/profile/04460784600003267020noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-24651930096493796742012-10-26T10:20:20.348-04:002012-10-26T10:20:20.348-04:00@007,
WC?@007,<br />WC?Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-7362237383923373512012-10-26T05:15:50.037-04:002012-10-26T05:15:50.037-04:00We do use monkeyrunner (chimpchat) from Java but w...We do use monkeyrunner (chimpchat) from Java but we couldn't figure out how to use WC module from Java?<br />007https://www.blogger.com/profile/04460784600003267020noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-67309866950712579082012-10-25T11:46:43.724-04:002012-10-25T11:46:43.724-04:00@007,
You can read http://dtmilano.blogspot.ca/201...@007,<br />You can read <a href="http://dtmilano.blogspot.ca/2011/11/android-using-monkey-from-java.html" rel="nofollow">http://dtmilano.blogspot.ca/2011/11/android-using-monkey-from-java.html</a> if you are intending to use Java.<br />Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-63291485830155641062012-10-25T09:46:53.526-04:002012-10-25T09:46:53.526-04:00Hi,
Is it possible to use AndroidViewClient direct...Hi,<br />Is it possible to use AndroidViewClient directly from java code ? Examples are welcome if possible.007https://www.blogger.com/profile/04460784600003267020noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-89091580272791470472012-10-15T16:50:52.577-04:002012-10-15T16:50:52.577-04:00Hi Diago, I have a situation. Whenever there is a ...Hi Diago, I have a situation. Whenever there is a edittext in the screen, the soft keyboard is popping up, and if I want to press a button though findViewById, (assuming that this particular button is behind the soft keyboard) fails. So as a work around I need to press back key through monkey runner. My question is how to determine whether soft keyboard is shown in the screen or not.Durairajhttps://www.blogger.com/profile/18054482512925202827noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-27327527700137745492012-10-03T14:24:44.125-04:002012-10-03T14:24:44.125-04:00@Prachi Bhagat,
To obtain read-only access to the ...@Prachi Bhagat,<br />To obtain read-only access to the git repository:<br /><br />$ cd somedir<br />$ git clone git://github.com/dtmilano/AndroidViewClient.gitDiego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-19991464235441021012012-10-03T03:28:23.243-04:002012-10-03T03:28:23.243-04:00please tell me the command to install it using git...please tell me the command to install it using git in ubuntu..i am new to git and android!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-25456655.post-17280595776508204142012-10-03T02:58:09.589-04:002012-10-03T02:58:09.589-04:00please tell me the command to install androidviewc...please tell me the command to install androidviewclient in ubuntu using git...am new to git/android Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-25456655.post-36858353089029068532012-08-28T05:00:03.963-04:002012-08-28T05:00:03.963-04:00I have tried to use viewCliet in my application an...I have tried to use viewCliet in my application and I am able to run but I am getting the wrong X/Y axis and because of that even touch function is not working.<br /><br />C:\Program Files\Android\android-sdk\tools>monkeyrunner.bat C:\Users\admin\Deskt<br />op\ViewClientExample\Example.py<br />Waiting for device connect....<br />Connected<br />Before Dump<br />After Dump<br />['_ViewClient__findViewWithAttributeInTree', '_ViewClient__splitAttrs', '__doc__<br />', '__init__', '__module__', 'assertServiceResponse', 'device', 'dump', 'findVie<br />wById', 'findViewByTag', 'findViewWithAttribute', 'findViewWithText', 'getRoot',<br /> 'getViewIds', 'parseTree', 'root', 'serviceResponse', 'setViews', 'traverse', '<br />views', 'viewsById']<br />clicking bWelcome @ (0,0) ...<br /><br />I the above code you can see it is tring to clik on (0,0) but that is not the correct cordinate for the same.hihttps://www.blogger.com/profile/06893559691642381469noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-61959094842782388082012-08-28T04:58:38.000-04:002012-08-28T04:58:38.000-04:00This comment has been removed by the author.hihttps://www.blogger.com/profile/06893559691642381469noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-78868064260122322122012-08-22T01:31:26.908-04:002012-08-22T01:31:26.908-04:00@Hope so,
What you have found ("No accessibil...@Hope so,<br />What you have found ("No accessibility event has occured yet") is a <b>monkey</b> bug. I think it has been reported already.<br /><br />Just in case, search for it in <a href="https://code.google.com/p/android/issues/advsearch" rel="nofollow">this bug search</a> <br />and if it is not there you can report it using <a href="https://code.google.com/p/android/issues/entry?template=Developer%20bug%20report" rel="nofollow">this bug report</a>.<br /><br /><br />Hey, at least this one is not mine :-)Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-68193305576515247922012-08-22T01:23:09.301-04:002012-08-22T01:23:09.301-04:00@Ari,
I described the text with spaces problem in ...@Ari,<br />I described the <b>text with spaces</b> problem in a previous comment. <br /><br />The inaccurate position of views (x,y) is the other big problem.<br /><br />I hope to have some time to look at them.<br /><br />Patches are welcome. After all, that's why it is Open Source.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-37700750765735179682012-08-22T01:19:59.768-04:002012-08-22T01:19:59.768-04:00@Spv Tv,
You have to set ANDROID_VIEW_CLIENT_HOME ...@Spv Tv,<br />You have to set ANDROID_VIEW_CLIENT_HOME pointing to the AndroidViewClient directory in the script's (Run2.py in your case) environment.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-34783774721628672742012-08-22T01:17:10.316-04:002012-08-22T01:17:10.316-04:00@snoopy,
Thanks for your comments.
What you've...@snoopy,<br />Thanks for your comments.<br />What you've found is a bug. It has been already identifyed (https://github.com/dtmilano/AndroidViewClient/blob/master/AndroidViewClient/src/com/dtmilano/android/viewclient.py#L264), however I didn't have time to think about a real solution yet.<br /><br />I promise to take a look at soon as I have some free time.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-87390358935825745462012-08-21T15:13:43.588-04:002012-08-21T15:13:43.588-04:00My issue would be about the same that previous pos...My issue would be about the same that previous poster said. If text:mText contains spaces, view isn't found.<br /><br />Also in the situations view is found, clicking on a view can sometimes miss it. Coordinates don't seem to be accurate.<br /><br />Very nice utility anyway, if these issues would be fixed benefits in using this would be enourmous.Arihttps://www.blogger.com/profile/10420780920453241227noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-92015305263494892382012-08-17T04:03:26.926-04:002012-08-17T04:03:26.926-04:00Hi diego ,
you really do a great contribution to ...Hi diego ,<br /><br />you really do a great contribution to android testing.but now I meet a problem when I use your script.<br />I can not find the result if the text string have space .for example below . I will get nothing .but the hierarchyviewer can show the mTest. <br /><br />Thanks In Advance!<br /><br />text = 'Modules One'<br />view = vc.findViewWithText(text)<br />result: can not find ...snoopyhttps://www.blogger.com/profile/17282823080991988240noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-23908917284866755942012-08-13T08:53:21.271-04:002012-08-13T08:53:21.271-04:00Hi!
Can you please help me. i dont really understa...Hi!<br />Can you please help me. i dont really understand how to install AndroidViewClient to use it:(<br />So when i try to import it a got <br />ERROR:<br />c:\monkeyrunner\Run2.py: ERROR: ANDROID_VIEW_CLIENT_HOME not set in environment<br /><br />How can i solve it?<br />I use Windows 7 OS.Anonymoushttps://www.blogger.com/profile/10752650052075479903noreply@blogger.com