I have python 2.7, android view client, adb environment setup in my PC. Also I have connected my android device with culebra tester installed in it and performed some Test case steps to record script (Java/python). Now I have the recorded script ready. Can any one tell me the right procedure to re-run the recorded script in the same android device automatically, because culebra tester doesn't have any option to re-run the test case. Any inputs would be appreciated.
Asked
Active
Viewed 342 times
1 Answers
1
Once you have generated your test script (if you selected python as the code generation language), you download it, rename it (it is downloaded as .py.txt to avoid browser warnings) and then you can run it as any other AndroidViewClient/culebra script.
You need python
and androidviewclient
installed via pip
or easy_install
.
If you generated java
code, then you copy or paste the code to your Android Studio project, create the APK, install and run.

Diego Torres Milano
- 65,697
- 9
- 111
- 134
-
Thanks for answering, I tried rerunning python script on the connected device using python IDLE after including the following code snippet `from com.dtmilano.android.viewclient import ViewClient device, serialno = ViewClient.connectToDeviceOrExit() vc = ViewClient(device=device, serialno=serialno)` Following error is seen: `Traceback (most recent call last): File "C:\Users\joshuaji\Desktop\My idea- automation\CMIcrash.py", line 27, in from com.dtmilano.android.viewclient import ViewClient ModuleNotFoundError: No module named 'com'` Can you help – Josh Jun 28 '18 at 12:23
-
check the [wiki](https://github.com/dtmilano/AndroidViewClient/wiki#microsoft-windows) it may help you with Windows installation – Diego Torres Milano Jun 29 '18 at 05:02
-
After setup, tried running the script, following error is thrown `Traceback (most recent call last):File "C:\Users\joshuaji\CMIcrash.py", line 31, in
pkg_resources.require('androidviewclient>=12.4.0') File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 888, in require needed = self.resolve(parse_requirements(requirements)) File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 774, in resolve raise DistributionNotFound(req, requirers) DistributionNotFound: The 'matplotlib' distribution was not found and is required by androidviewclient.` Kindly help – Josh Jun 29 '18 at 13:18 -
The above solution only clears the last error in line 774. but I am seeing a different error in the same line `DistributionNotFound: The 'requests' distribution was not found and is required by androidviewclient`. Also in the third last comment can you help to solve error in line 31 and line 888 as they are still unresolved? – Josh Jul 02 '18 at 04:16