aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/wdio/hooks/index.js')
-rw-r--r--vendor/blueimp/jquery-file-upload/wdio/hooks/index.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js b/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js
index f369f5614..918502c3a 100644
--- a/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js
+++ b/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js
@@ -5,11 +5,21 @@
const cmds = require('wdio-screen-commands')
/* eslint-disable jsdoc/valid-types */
-/** @type WebdriverIO.HookFunctions */
+/** @type WebdriverIO.HookFunctionExtension */
const config = {
before: async () => {
+ // Add browser commands:
browser.addCommand('saveScreenshotByName', cmds.saveScreenshotByName)
browser.addCommand('saveAndDiffScreenshot', cmds.saveAndDiffScreenshot)
+ // Add element commands:
+ browser.addCommand('saveScreenshotByName', cmds.saveScreenshotByName, true)
+ browser.addCommand(
+ 'saveAndDiffScreenshot',
+ cmds.saveAndDiffScreenshot,
+ true
+ )
+ if (browser.config.appium)
+ await browser.updateSettings(browser.config.appium)
if (browser.config.maximizeWindow) await browser.maximizeWindow()
},
beforeTest: async test => {