mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 15:50:28 +01:00
23 lines
547 B
JavaScript
23 lines
547 B
JavaScript
require('chromedriver')
|
|
require('geckodriver')
|
|
const webdriver = require('selenium-webdriver')
|
|
|
|
exports.delay = function delay (time) {
|
|
return new Promise(resolve => setTimeout(resolve, time))
|
|
}
|
|
|
|
|
|
exports.buildChromeWebDriver = function buildChromeWebDriver (extPath) {
|
|
return new webdriver.Builder()
|
|
.withCapabilities({
|
|
chromeOptions: {
|
|
args: [`load-extension=${extPath}`],
|
|
},
|
|
})
|
|
.build()
|
|
}
|
|
|
|
exports.buildFirefoxWebdriver = function buildFirefoxWebdriver (extPath) {
|
|
return new webdriver.Builder().build()
|
|
}
|