-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
8.26.2
Node.js Version
v16.20.2
Mode
WDIO Testrunner
Which capabilities are you using?
{
deviceA: {
capabilities: {
'appium:platformName': 'Android',
'appium:automationName': 'UiAutomator2',
'appium:orientation': 'PORTRAIT',
'appium:deviceName': 'Android_Test',
'appium:platformVersion': '9',
'appium:app': appPath,
'appium:appWaitActivity': '*',
'appium:noReset': true,
'appium:autoGrantPermissions': true,
'appium:deviceType': 'phone'
}
},
browserA: {
capabilities: {
browserName: 'chrome',
browserVersion: 'stable'
}
}
}What happened?
When trying to let chromedriver automatically download and configure chromedriver in a multiremote project with appium (mobile and browser) a problem occurs:
- I tried to let webdriverio download and configure chromedriver by itself just by configuring
browserName: 'chrome',
browserVersion: 'stable',
on capabilities, but this way I need to remove the chromedriver from services, right? If I remove it from there, webdriverio treats capabilities as an appium instance and gives an error
(ERROR webdriver: Request failed with status 400 due to invalid argument: 'automationName' can't be blank; 'platformName' can't be blank) .
If I don't remove the chromedriver from the services, it gives an error claiming that I need the chromedriver installed, error message:
ERROR chromedriver: Can't load chromedriver, please define "chromedriverCustomPath" property or install dependency via "npm install chromedriver --save- dev"
What is your expected behavior?
Would be expected would be that there would be some way for webdriverio to automatically download and configure chromedriver even in this multiremote scenario with appium and chromedriver
How to reproduce the bug.
To reproduce the bug, try using webdriverio with multiremote using the chromedriver and appium services together, example of capabilities:
{
deviceA: {
capabilities: {
'appium:platformName': 'Android',
'appium:automationName': 'UiAutomator2',
'appium:orientation': 'PORTRAIT',
'appium:deviceName': 'Android_Test',
'appium:platformVersion': '9',
'appium:app': appPath,
'appium:appWaitActivity': '*',
'appium:noReset': true,
'appium:autoGrantPermissions': true,
'appium:deviceType': 'phone',
},
},
browserA: {
capabilities: {
browserName: 'chrome',
browserVersion: 'stable',
'goog:chromeOptions': browserOptions,
},
},
};
also configure the services:
services: [
[
'appium',
{
command: 'appium',
},
],
],
or you can add ['chromedriver'] to services which will also give error
Relevant log output
[0-1] 2024-02-28T22:13:14.648Z ERROR webdriver: Request failed with status 400 due to invalid argument: 'automationName' can't be blank; 'platformName' can't be blank
[0-1] 2024-02-28T22:13:14.648Z ERROR webdriver: invalid argument: 'automationName' can't be blank; 'platformName' can't be blank
[0-1] at getErrorFromResponseBody (file:///example.js:195:12)
[0-1] at NodeJSRequest._request (file:///example.js:193:23)
[0-1] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[0-1] at async startWebDriverSession (file:///example.js:64:20)
[0-1] at async Function.newSession (file:///example.js:19:45)
[0-1] at async remote (file:///example.js:45:22)
[0-1] at async file:///example.js:100:26
[0-1] at async Promise.all (index 1)
[0-1] at async multiremote (file:///example.js:99:5)
[0-1] at async initializeInstance (file:///example.js:81:21)
[0-1] at async Runner._startSession (file:///example:224:29)
[0-1] at async Runner._initSession (file:///example.js:190:25)
[0-1] at async Runner.run (file:///example.js:79:19)
[0-1] 2024-02-28T22:13:14.651Z ERROR @wdio/runner: Error: Failed to create session.
[0-1] 'automationName' can't be blank; 'platformName' can't be blank
[0-1] at startWebDriverSession (file:///example.js:69:15)
[0-1] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[0-1] at async Function.newSession (file:///example.js:19:45)
[0-1] at async remote (file:///example.js:45:22)
[0-1] at async file:///example.js:100:26
[0-1] at async Promise.all (index 1)
[0-1] at async multiremote (file:///example.js:99:5)
[0-1] at async initializeInstance (file:///example.js:81:21)
[0-1] at async Runner._startSession (file:///example.js:224:29)
[0-1] at async Runner._initSession (file:///example.js:190:25)
[0-1] at async Runner.run (file:///example.js:79:19)
[0-1] FAILED in MultiRemote - file:///example.spec.ts
2024-02-28T22:13:14.782Z INFO @wdio/cli:launcher: Run onWorkerEnd hook
2024-02-28T22:13:14.783Z INFO @wdio/cli:launcher: Run onComplete hook
Report successfully generated to allure-report
Allure report successfully generated
2024-02-28T22:13:17.362Z INFO @wdio/appium-service: Appium (pid: 19932) killed
Spec Files: 0 passed, 2 failed, 1 total (200% completed) in 00:00:13
2024-02-28T22:13:17.364Z INFO @wdio/local-runner: Shutting down spawned worker
2024-02-28T22:13:17.366Z ERROR @wdio/appium-service: Appium exited before timeout (exit code: null)
2024-02-28T22:13:17.616Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2024-02-28T22:13:17.617Z INFO @wdio/local-runner: shutting down
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.Code of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues