We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c295ff commit 09bbaebCopy full SHA for 09bbaeb
tests/jsunit/test_runner.js
@@ -1,8 +1,17 @@
1
require('chromedriver');
2
var webdriver = require('selenium-webdriver');
3
-var browser = new webdriver.Builder()
4
- .forBrowser('chrome')
5
- .build();
+var chrome = require('selenium-webdriver/chrome');
+var builder = new webdriver.Builder().forBrowser('chrome');
+
6
+if (process.env.CI) {
7
+ const options = new chrome.Options().headless();
8
+ if (process.platform === 'linux') {
9
+ options.addArguments('no-sandbox');
10
+ }
11
+ builder.setChromeOptions(options);
12
+}
13
14
+var browser = builder.build();
15
16
// Parse jsunit html report, exit(1) if there are any failures.
17
var testHtml = function (htmlString) {
0 commit comments