Skip to content

Commit

Permalink
Merge pull request #137 from percy/fix-poa-fetch-capability
Browse files Browse the repository at this point in the history
fix: fetching capability for wd
  • Loading branch information
nilshah98 authored Aug 21, 2023
2 parents 61aa75b + 6bcdd73 commit 42dbeef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion percy/percyOnAutomate.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = async function percyOnAutomate(driver, name, options) {
// This AppiumDriver has a property of driver which contains the original driver
// Hence to access the capabilities of original driver adding this fix
// Also, note that driverWrapper.getCapabilities() returns only few capabilities and not all
const capabilities = driver.driver.capabilities;
const capabilities = driver.type === 'wd' ? await driver.getCapabilities() : driver.driver.capabilities;
const commandExecutorUrl = driver.commandExecutorUrl;

/* istanbul ignore next */
Expand Down

0 comments on commit 42dbeef

Please sign in to comment.