Skip to main content

Python client for visual testing with Percy for mobile apps

Project description


PyPI version Test

Percy visual testing for Python Appium.


npm install @percy/cli:

$ npm install --save-dev @percy/cli

pip install Percy appium package:

$ pip install percy-appium-app


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 + "", 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:[your-project]
[percy] Screenshot taken "Python example"
[percy] Stopping percy...
[percy] Finalized build #1:[your-project]
[percy] Done!


percy_screenshot(driver, name[, **kwargs])

  • driver (required) - A appium driver instance
  • name (required) - The screenshot name; must be unique to each screenshot
  • device_name (optional) - The device name used for capturing screenshot
  • orientation (optional) - Orientation of device while capturing screeenshot; Allowed values [portrait | landscape]
  • status_bar_height (optional) - Height of status bar; number
  • nav_bar_height (optional) - Height of navigation bar; number
  • full_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)

Uploaded Source

Built Distributions

percy_appium_app-0.0.5-py3-none-any.whl (14.8 kB view hashes)

Uploaded Python 3

percy_appium_app-0.0.5-5-py3-none-any.whl (14.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page