WebdriverIO in watch-mode "forgets" hostname and protocol if not explicitly specified
See original GitHub issueEnvironment (please complete the following information):
- WebdriverIO version: [7.1.0]
- Mode: [WDIO Testrunner]
- If WDIO Testrunner, running sync/async: [async]
Config of WebdriverIO
export const config: WebdriverIO.Config = {
runner: "local",
specs: ["__specs__/*.spec.js"],
specFileRetries: 0,
capabilities: [{browserName: "chrome", "goog:chromeOptions": {args: chrome_args}}],
port: 9515,
path: "/",
services: [
["chromedriver", {logFileName: `${test_dir}/chromedriver.log`, port: 9515}],
],
}
Note: The bug happens with the default service as well.
Describe the bug WebdriverIO works fine until I try to use the watch mode. Then the first run is still ok but the consecutive ones fail with:
UnsupportedProtocolError: Unsupported protocol "undefined:"
at normalizeArguments (/Users/pero/src/pero/cling-main/node_modules/got/dist/source/core/index.js:420:23)
at normalizeArguments (/Users/pero/src/pero/cling-main/node_modules/got/dist/source/as-promise/core.js:34:31)
at Object.got [as default] (/Users/pero/src/pero/cling-main/node_modules/got/dist/source/create.js:88:39)
at WebDriverRequest._request (/Users/pero/src/pero/cling-main/node_modules/webdriver/build/request.js:126:41)
at WebDriverRequest.makeRequest (/Users/pero/src/pero/cling-main/node_modules/webdriver/build/request.js:68:21)
at Browser.protocolCommand (/Users/pero/src/pero/cling-main/node_modules/webdriver/build/command.js:74:24)
at Browser.wrapCommandFn (/Users/pero/src/pero/cling-main/node_modules/@wdio/utils/build/shim.js:79:38)
It works once I explicitly configure hostname and protocol:
config = {
...
hostname: "localhost",
protocol: "http",
...
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Configuration - WebdriverIO
Protocol to use when communicating with the driver server. Type: String Default: http. hostname. Host of your driver server. Type: String
Read more >Configuration File - WebdriverIO
The configuration file contains all necessary information to run your test suite. It's a NodeJS module that exports a JSON. Here is an...
Read more >WebDriver Protocol - WebdriverIO
newSession. The New Session command creates a new WebDriver session with the endpoint node. If the creation fails, a session not created error...
Read more >Auto-waiting - WebdriverIO
Explicit . The WebDriver protocol offers implicit timeouts that allow specify how long the driver is suppose to wait for an element to...
Read more >TypeScript Setup - WebdriverIO
WebdriverIO will automatically detect if these dependencies are installed and will compile your config and tests for you. Ensure to have a tsconfig.json...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@christian-bromann just saw the tags you added. I don’t mind trying picking this up, but I just left on vacation for a week, and I have to onboard a new dev when I return, so it could be 10-15 days before I’m able to contribute.
@jbblanchet Ah, sorry. I was in the middle of something else and just wanted to help out quickly. Great to hear that it worked in the end.