aboutsummaryrefslogblamecommitdiffstats
path: root/test/screens/func.js
blob: 733225565d21ac108e0b685c42b60dce3bfeff91 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                            
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()
}