Skip to content

Commit 1917acc

Browse files
test: add Firefox to test setup
Replace chromedriver with the wdio selenium standalone service to support multiple drivers at once. Add Firefox to the wdio.conf.js capabilities
1 parent 3d87bdd commit 1917acc

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,15 @@
4141
"@wdio/cli": "^7.3.1",
4242
"@wdio/local-runner": "^7.3.1",
4343
"@wdio/mocha-framework": "^7.3.1",
44+
"@wdio/selenium-standalone-service": "^7.7.3",
4445
"@wdio/spec-reporter": "^7.3.1",
4546
"@wdio/sync": "^7.3.1",
46-
"chromedriver": "^91.0.0",
4747
"eslint": "^7.6.0",
4848
"kcd-scripts": "^5.0.0",
4949
"npm-run-all": "^4.1.5",
5050
"semantic-release": "^17.0.2",
5151
"ts-node": "^9.1.1",
52-
"typescript": "^4.1.3",
53-
"wdio-chromedriver-service": "^7.0.0"
52+
"typescript": "^4.1.3"
5453
},
5554
"repository": {
5655
"type": "git",

wdio.conf.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,21 @@ exports.config = {
5454
//
5555
capabilities: [
5656
{
57-
// maxInstances can get overwritten per capability. So if you have an in-house Selenium
58-
// grid with only 5 firefox instances available you can make sure that not more than
59-
// 5 instances get started at a time.
6057
maxInstances: 5,
61-
//
6258
browserName: 'chrome',
6359
acceptInsecureCerts: true,
64-
// If outputDir is provided WebdriverIO can capture driver session logs
65-
// it is possible to configure which logTypes to include/exclude.
66-
// excludeDriverLogs: ['*'], // pass '*' to exclude all driver session logs
67-
// excludeDriverLogs: ['bugreport', 'server'],
6860
'goog:chromeOptions': {
6961
args: process.env.CI ? ['--headless'] : [],
7062
},
7163
},
64+
{
65+
maxInstances: 5,
66+
browserName: 'firefox',
67+
acceptInsecureCerts: true,
68+
'moz:firefoxOptions': {
69+
args: process.env.CI ? ['--headless'] : [],
70+
},
71+
},
7272
],
7373
//
7474
// ===================
@@ -117,7 +117,7 @@ exports.config = {
117117
// Services take over a specific job you don't want to take care of. They enhance
118118
// your test setup with almost no effort. Unlike plugins, they don't add new
119119
// commands. Instead, they hook themselves up into the test process.
120-
services: ['chromedriver'],
120+
services: [['selenium-standalone', {drivers: {firefox: true, chrome: true}}]],
121121

122122
// Framework you want to run your specs with.
123123
// The following are supported: Mocha, Jasmine, and Cucumber

0 commit comments

Comments
 (0)