1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 02:58:09 +01:00
metamask-extension/test/e2e/func.js

23 lines
547 B
JavaScript
Raw Normal View History

require('chromedriver')
require('geckodriver')
2017-09-12 23:14:24 +02:00
const webdriver = require('selenium-webdriver')
exports.delay = function delay (time) {
return new Promise(resolve => setTimeout(resolve, time))
}
exports.buildChromeWebDriver = function buildChromeWebDriver (extPath) {
2017-09-12 23:14:24 +02:00
return new webdriver.Builder()
.withCapabilities({
chromeOptions: {
args: [`load-extension=${extPath}`],
},
})
.build()
}
exports.buildFirefoxWebdriver = function buildFirefoxWebdriver (extPath) {
return new webdriver.Builder().build()
}