aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e/func.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/func.js')
-rw-r--r--test/e2e/func.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/e2e/func.js b/test/e2e/func.js
index 8b221ce47..9f06e7f37 100644
--- a/test/e2e/func.js
+++ b/test/e2e/func.js
@@ -1,5 +1,7 @@
require('chromedriver')
require('geckodriver')
+const fs = require('fs')
+const os = require('os')
const path = require('path')
const webdriver = require('selenium-webdriver')
const Command = require('selenium-webdriver/lib/command').Command
@@ -19,10 +21,15 @@ function delay (time) {
}
function buildChromeWebDriver (extPath) {
+ const tmpProfile = path.join(os.tmpdir(), fs.mkdtempSync('mm-chrome-profile'));
return new webdriver.Builder()
.withCapabilities({
chromeOptions: {
- args: [`load-extension=${extPath}`],
+ args: [
+ `load-extension=${extPath}`,
+ `user-data-dir=${tmpProfile}`,
+ ],
+ binary: process.env.SELENIUM_CHROME_BINARY,
},
})
.build()
@@ -53,4 +60,4 @@ async function installWebExt (driver, extension) {
.defineCommand(cmd.getName(), 'POST', '/session/:sessionId/moz/addon/install')
return await driver.schedule(cmd, 'installWebExt(' + extension + ')')
-} \ No newline at end of file
+}