I am using AndroidViewClient/Culebra to generate scripts. The screen contains an image I would like to save to disk. The image is not clickable. How can I record it automatically with AndroidViewClient/Culebra ? Or should I manually find the view of the image with the script dump and use the medthod writeImageToFile ?
Asked
Active
Viewed 565 times
1 Answers
0
If you click with the secondary button on the culebra
main window (the one showing the screenshot of the device) the context menu is showed (as depicted here).
Then you can select Take snapshot and save to file (shortcut: Ctrl+F) or Take view snapshot and save to file whether you want to capture the whole screen or just the View you clicked on.
The corresponding line will be generated in the script. To avoid overwriting the previous images, the file name contains some keywords that will be replaced at run-time (i.e. timestamp).

Diego Torres Milano
- 65,697
- 9
- 111
- 134
-
great, I can open the context menu, I move the mouse cursor over the view of the image but the options has "Take snapshot and save to file" but no option "Take view snapshot and save to file". The second problem is there is a sign ":" in the filename which windows does not accept as file name. I can see the option -f with culebra but it still use the automatic filename, here is the command to start culebra "culebra --scale=0.4 -VC -uG -t on -d on -f test_image.jpg -o test.py 192.168.56.100:5555" – tuan dat nguyen Mar 16 '15 at 06:22
-
The api is 16 so it uses uiautomator, I try culebra -F but it can't see the view of the image so there is no option "Take view snapshot and save to file", On the other hand the timestamp in the filename has the sign ":" which breaks the saving of the image on Windows. – tuan dat nguyen Mar 16 '15 at 06:47
-
You should click on the View you want to take the snapshot (the menu is context sensitive). – Diego Torres Milano Mar 16 '15 at 20:02
-
If Windows does not support some filenames, just edit the script and instead of the filename with keywords (in {}) add a simple filename Windows could handle. – Diego Torres Milano Mar 16 '15 at 20:04
-
That is great, I can find the image view and save it. But I need to add manually the code line writeImageToFile in the generated script because it is not automatically generated when I click on Take view snapshot as there is an error message "Invalid filename...." I think you need to replace the automatic timestamp which has the sign ":" by the sign "-" for example in the script codes where it is coded, at least for Windows. – tuan dat nguyen Mar 17 '15 at 06:18
-
This will be fixed for Windows in future versions. – Diego Torres Milano Mar 17 '15 at 15:53