Percy visual testing for Appium and Webdriver.
Assuming you have an existing Appium setup using Webdriver:
- Install the
@percy/appium-wdpackage:yarn add -D @percy/appium-wdornpm i -D @percy/appium-wd importorrequirethe SDK into the test suite (this can be done in a setup file or anywhere before the tests start):import '@percy/appium-wd';orrequire('@percy/appium-wd');- Call
await driver.percySnapshot('snapshot name')in your tests (for example):
test('Percy works', async () => {
await driver.percySnapshot('test');
});- Finally, when running your tests, wrap the test command with
percy exec. For example:percy exec -- jest. Be sure yourPERCY_TOKENis set in the terminal you're runningpercy execfrom (you can get yourPERCY_TOKENfrom your Percy projects settings).