mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-13 13:17:13 +01:00
19 lines
419 B
JavaScript
19 lines
419 B
JavaScript
|
require('chromedriver')
|
||
|
const webdriver = require('selenium-webdriver')
|
||
|
|
||
|
exports.delay = function delay (time) {
|
||
|
return new Promise(resolve => setTimeout(resolve, time))
|
||
|
}
|
||
|
|
||
|
|
||
|
exports.buildWebDriver = function buildWebDriver (extPath) {
|
||
|
return new webdriver.Builder()
|
||
|
.withCapabilities({
|
||
|
chromeOptions: {
|
||
|
args: [`load-extension=${extPath}`],
|
||
|
},
|
||
|
})
|
||
|
.forBrowser('chrome')
|
||
|
.build()
|
||
|
}
|