aboutsummaryrefslogtreecommitdiffstats
path: root/test/screens/func.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/screens/func.js')
-rw-r--r--test/screens/func.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/screens/func.js b/test/screens/func.js
new file mode 100644
index 000000000..733225565
--- /dev/null
+++ b/test/screens/func.js
@@ -0,0 +1,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()
+}