Skip to content

Commit fc26110

Browse files
committed
fix(webdriver): fix firefox automation problems
1 parent 35e984f commit fc26110

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
no_output_timeout: 15m
131131
command: |
132132
set -em
133-
VERSION=64 BROWSER=firefox npm run test:integration
133+
BROWSER=firefox npm run test:integration
134134
- store_test_results:
135135
path: reports/junit/wdio
136136
- store_artifacts:

wdio.conf.js

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const dotenv = require('dotenv');
66
dotenv.config();
77
dotenv.config({path: '.env.default'});
88

9-
109
// eslint-disable-next-line prefer-destructuring
1110
const argv = require('yargs').argv;
1211

@@ -16,6 +15,7 @@ const {inject} = require('./scripts/tests/openh264');
1615
const beforeSuite = require('./scripts/tests/beforeSuite');
1716

1817
const port = process.env.PORT || 4567;
18+
const isSauceEnabled = (process.env.SAUCE === 'true');
1919
let baseUrl = process.env.JOURNEY_TEST_BASE_URL;
2020

2121
if (!baseUrl) {
@@ -35,7 +35,7 @@ const screenResolution = platform.toLowerCase().includes('os x') || platform ===
3535

3636
const chromeCapabilities = {
3737
browserName: 'chrome',
38-
chromeOptions: {
38+
'goog:chromeOptions': {
3939
args: [
4040
'--use-fake-device-for-media-stream',
4141
'--use-fake-ui-for-media-stream',
@@ -47,10 +47,20 @@ const chromeCapabilities = {
4747
}
4848
};
4949
const firefoxCapabilities = {
50-
browserName: 'firefox'
50+
browserName: 'firefox',
51+
'moz:firefoxOptions': {
52+
prefs: {
53+
'media.navigator.permission.disabled': true,
54+
'media.peerconnection.video.h264_enabled': true,
55+
'media.navigator.streams.fake': true,
56+
'media.getusermedia.screensharing.enabled': true,
57+
'media.getusermedia.screensharing.allowed_domains': 'localhost, 127.0.0.1',
58+
'dom.webnotifications.enabled': false,
59+
'media.gmp-manager.updateEnabled': true
60+
}
61+
}
5162
};
5263
let mochaTimeout = 60000;
53-
const isSauceEnabled = (process.env.SAUCE === 'true');
5464

5565
if (process.env.DEBUG_JOURNEYS) {
5666
mochaTimeout = 99999999;
@@ -305,6 +315,7 @@ if (isSauceEnabled) {
305315
commandTimeout: 600,
306316
maxDuration: 3600,
307317
seleniumVersion: '3.4.0',
318+
extendedDebugging: true,
308319
screenResolution,
309320
platform,
310321
version
@@ -317,6 +328,19 @@ if (isSauceEnabled) {
317328
commandTimeout: 600,
318329
maxDuration: 3600,
319330
seleniumVersion: '3.4.0',
331+
extendedDebugging: true,
332+
// extended debugging
333+
'moz:firefoxOptions': {
334+
args: [
335+
'-start-debugger-server',
336+
'9222'
337+
],
338+
prefs: {
339+
'devtools.chrome.enabled': true,
340+
'devtools.debugger.prompt-connection': false,
341+
'devtools.debugger.remote-enabled': true
342+
}
343+
},
320344
screenResolution,
321345
platform,
322346
version

0 commit comments

Comments
 (0)