Python client for visual testing with Percy for mobile apps
Project description
percy-appium-python
Percy visual testing for Python Appium.
Installation
npm install @percy/cli
:
$ npm install --save-dev @percy/cli
pip install Percy appium package:
$ pip install percy-appium-app
Usage
This is an example test using the percy_screenshot
function.
from appium import webdriver
from percy import percy_screenshot
driver = webdriver.Remote("https://" + userName + ":" + accessKey + "@hub-cloud.browserstack.com/wd/hub", desired_caps)
# take a screenshot
percy_screenshot(driver, 'here is some name')
Running the test above normally will result in the following log:
[percy] Percy is not running, disabling screenshots
When running with percy app:exec
, and your project's
PERCY_TOKEN
, a new Percy build will be created and screenshots will be uploaded to your project.
$ export PERCY_TOKEN=[your-project-token]
$ percy app:exec -- [python test command]
[percy] Percy has started!
[percy] Created build #1: https://percy.io/[your-project]
[percy] Screenshot taken "Python example"
[percy] Stopping percy...
[percy] Finalized build #1: https://percy.io/[your-project]
[percy] Done!
Configuration
percy_screenshot(driver, name[, **kwargs])
driver
(required) - A appium driver instancename
(required) - The screenshot name; must be unique to each screenshotdevice_name
(optional) - The device name used for capturing screenshotorientation
(optional) - Orientation of device while capturing screeenshot; Allowed values [portrait
|landscape
]status_bar_height
(optional) - Height of status bar; numbernav_bar_height
(optional) - Height of navigation bar; numberfull_screen
(optional) - Indicate whether app is full screen; boolean
Migrating Config
If you have a previous Percy configuration file, migrate it to the newest version with the
config:migrate
command:
$ percy config:migrate
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
percy-appium-app-0.0.5.tar.gz
(11.6 kB
view hashes)
Built Distributions
Close
Hashes for percy_appium_app-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54eba77f98ef3aa14f09fe907f7bbe4cd2d94319b557dd1f0aa3a3c4f696a4e4 |
|
MD5 | bfe934dff59fa5d1917490bf2cf9ebc3 |
|
BLAKE2b-256 | bd62f740c9fabae2bbaa0a15810fe107b89ec1ce2c6fb6bfb8719d457955faa1 |
Close
Hashes for percy_appium_app-0.0.5-5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf27066f9f6486cec2acdbc2182675f645377d65e00832646aba432d59367c79 |
|
MD5 | 8a67c4abac536fb2b2966f915ffb6737 |
|
BLAKE2b-256 | 2492d453464c815f273532efb9eb3fb71330681a1ac10f972b426f677f2eb53b |