Created
May 17, 2016 18:56
-
-
Save JaniJegoroff/5a3981b107b8c76e2fad94edd2351ad0 to your computer and use it in GitHub Desktop.
How to capture photo with Google camera using AndroidViewClient
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install AndroidViewClient: https://github.com/dtmilano/AndroidViewClient/wiki | |
2. Implement python script that touches button by id | |
3. Execute python script from your Appium or Calabash test script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from com.dtmilano.android.viewclient import ViewClient | |
id = 'com.android.camera2:id/shutter_button' # Google camera capture button | |
vc = ViewClient(*ViewClient.connectToDeviceOrExit()) | |
vc.findViewById(id).touch() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`python capture_photo.py` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment