Index: test/runners/firefox_process.js |
=================================================================== |
--- a/test/runners/firefox_process.js |
+++ b/test/runners/firefox_process.js |
@@ -25,22 +25,17 @@ |
const {ensureFirefox} = require("./firefox_download"); |
// Firefox 57 seems to be the minimum to reliably run with WebDriver |
// on certain system configurations like Debian 9, TravisCI. |
const FIREFOX_VERSION = "57.0"; |
function runScript(firefoxPath, script, scriptName, scriptArgs) |
{ |
- let binary = new firefox.Binary(firefoxPath); |
- binary.addArguments("-headless"); |
- |
- const options = new firefox.Options() |
- .setBinary(binary); |
- |
+ const options = new firefox.Options().setBinary(firefoxPath).headless(); |
const driver = new Builder() |
.forBrowser("firefox") |
.setFirefoxOptions(options) |
.build(); |
return executeScript(driver, "Firefox", script, scriptName, scriptArgs); |
} |