My application uses chrome custom tabs. When I am running my test locally with below android.config capabilities, my testScript is running fine.
config.capabilities = [
{
platformName: ‘Android’,
noReset: true,
fullReset: false,
maxInstances: 1,
automationName: ‘uiautomator2’,
deviceName: AndroidInfo.deviceName(),
platformVersion: AndroidInfo.platFormVersion(),
app: AndroidInfo.appName(),
},
];
But when I modify the capabilities by adding browserName, I am facing error
config.capabilities = [
{
platformName: ‘Android’,
noReset: true,
fullReset: false,
maxInstances: 1,
automationName: ‘uiautomator2’,
deviceName: AndroidInfo.deviceName(),
platformVersion: AndroidInfo.platFormVersion(),
browserName: ‘chrome’,
app: AndroidInfo.appName(),
},
];
Error:
[0-0] at getErrorFromResponseBody (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/webdriver/build/utils.js:197:12)
[0-0] at NodeJSRequest._request (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/webdriver/build/request/index.js:158:60)
[0-0] at processTicksAndRejections (internal/process/task_queues.js:95:5)
[0-0] at async startWebDriverSession (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/webdriver/build/utils.js:67:20)
[0-0] at async Function.newSession (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/webdriver/build/index.js:46:45)
[0-0] at async remote (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/webdriverio/build/index.js:77:22)
[0-0] at async Runner._startSession (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/@wdio/runner/build/index.js:223:56)
[0-0] at async Runner._initSession (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/@wdio/runner/build/index.js:176:25)
[0-0] at async Runner.run (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/@wdio/runner/build/index.js:88:19)
[0-0] 2022-05-04T12:10:32.033Z ERROR @wdio/runner: Error: Failed to create session.
[0-0] An unknown server-side error occurred while processing the command. Original error: No Chromedriver found that can automate Chrome ‘91.0.4472’. You could also try to enable automated chromedrivers download server feature. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details
[0-0] at startWebDriverSession (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/webdriver/build/utils.js:72:15)
[0-0] at processTicksAndRejections (internal/process/task_queues.js:95:5)
[0-0] at async Function.newSession (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/webdriver/build/index.js:46:45)
[0-0] at async remote (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/webdriverio/build/index.js:77:22)
[0-0] at async Runner._startSession (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/@wdio/runner/build/index.js:223:56)
[0-0] at async Runner._initSession (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/@wdio/runner/build/index.js:176:25)
[0-0] at async Runner.run (/Users/harsha.sharmagelato.com/Dev/work/sandbox/gelato-api-mobile/integration-tests/node_modules/@wdio/runner/build/index.js:88:19)
2022-05-04T12:10:32.141Z DEBUG @wdio/local-runner: Runner 0-0 finished with exit code 1
[0-0] FAILED in chrome - /test/features/login1.feature
2022-05-04T12:10:32.141Z INFO @wdio/cli:launcher: Run onWorkerEnd hook
2022-05-04T12:10:32.141Z DEBUG @wdio/cli:utils: Finished to run “onWorkerEnd” hook in 0ms
2022-05-04T12:10:32.141Z INFO @wdio/cli:launcher: Run onComplete hook
2022-05-04T12:10:32.142Z DEBUG @wdio/appium-service: Appium (pid: 70346) killed
2022-05-04T12:10:32.142Z DEBUG @wdio/cli:utils: Finished to run “onComplete” hook in 1ms
Package.json: