-
Notifications
You must be signed in to change notification settings - Fork 36
Support Elements objects ($$) as members of hideElements and removeElements arrays #12
Comments
Hi @treyturner Thanks for this issue, I now only support single elements, no element arrays. I need to check that one. It's a bug and a feature 😉 |
I'm running into a similar issue. I get the
error when I'm running saveFullPageScreen and checkFullPageScreen. Assigning this array to hideElements when I'm calling these. ['footerFormButton'] and a stack trace: [chrome windows nt #0-0] javascript error: Cannot set property 'visibility' of undefined
(Session info: chrome=75.0.3770.142)
[chrome windows nt #0-0] javascript error: javascript error: Cannot set property 'visibility' of undefined
[chrome windows nt #0-0] (Session info: chrome=75.0.3770.142)
[chrome windows nt #0-0] at getErrorFromResponseBody ([LOCALDIR]\node_modules\webdriver\build\utils.js:371:10)
[chrome windows nt #0-0] at Request._callback ([LOCALDIR]node_modules\webdriver\build\request.js:122:64)
[chrome windows nt #0-0] at Request.self.callback ([LOCALDIR]node_modules\request\request.js:185:22)
[chrome windows nt #0-0] at Request.<anonymous> ([LOCALDIR]node_modules\request\request.js:1161:10)
[chrome windows nt #0-0] at IncomingMessage.<anonymous> ([LOCALDIR]node_modules\request\request.js:1083:12)
[chrome windows nt #0-0] at Browser.runCommand ([LOCALDIR]node_modules\@wdio\sync\build\wrapCommand.js:31:24)
[chrome windows nt #0-0] at Browser.<anonymous> ([LOCALDIR]node_modules\@wdio\sync\build\wrapCommand.js:53:31)
[chrome windows nt #0-0] at Browser.execute ([LOCALDIR]node_modules\@wdio\runner\node_modules\webdriverio\build\commands\browser\execute.js:64:15)
[chrome windows nt #0-0] at Browser.runCommand ([LOCALDIR]node_modules\@wdio\sync\build\wrapCommand.js:37:32)
[chrome windows nt #0-0] at Object.<anonymous> ([LOCALDIR]node_modules\webdriver-image-comparison\build\helpers\beforeScreenshot.js:79:32)
[chrome windows nt #0-0] at step ([LOCALDIR]node_modules\webdriver-image-comparison\build\helpers\beforeScreenshot.js:43:23)
[chrome windows nt #0-0] at Object.next ([LOCALDIR]node_modules\webdriver-image-comparison\build\helpers\beforeScreenshot.js:24:53)
[chrome windows nt #0-0] at fulfilled ([LOCALDIR]node_modules\webdriver-image-comparison\build\helpers\beforeScreenshot.js:15:58)
[chrome windows nt #0-0] at Browser.checkFullPageScreen ([LOCALDIR]node_modules\@wdio\sync\build\wrapCommand.js:53:31)
[chrome windows nt #0-0] at Browser.next [as checkFullPageScreen] ([LOCALDIR]node_modules\webdriver\build\monad.js:175:27)
[chrome windows nt #0-0] at Context.it ([LOCALDIR]test\specs\visualRegression.js:36:40)
[chrome windows nt #0-0] at Promise ([LOCALDIR]node_modules\@wdio\sync\build\index.js:65:22)
[chrome windows nt #0-0] at Context.executeSync ([LOCALDIR]node_modules\@wdio\sync\build\index.js:63:10)
[chrome windows nt #0-0] at [LOCALDIR]node_modules\@wdio\sync\build\index.js:209:70 |
@treyturner and @Wexx I created a PR for this but my TypeScript skills are not at a ninja level. Hopefully you can take a take a look at it, see #34 |
I've released a new version called https://github.com/wswebcreation/webdriver-image-comparison/releases/tag/v0.9.0 |
Hey Wim! Thanks for your hard work on this!! Is my understanding correct that the wdio image compare service has to be updated and a new version of that to be released for wdio users to benefit from this release? |
Hi @iamkenos Yes, I've released a new version, see https://github.com/wswebcreation/wdio-image-comparison-service/releases/tag/v1.6.0 |
It doesn't seem possible to pass Elements objects ($$) as members of the
hideElements
array. The following error is produced:javascript error: Cannot set property 'visibility' of undefined
I ended up coming up with a workaround, but it might be more intuitive to allow this.
The ES6 workaround I discovered:
Thanks for your work on this by the way, it's immediately immensely useful as I can now scrap the v4 fork of my suite I was keeping alive just for visual regression.
The text was updated successfully, but these errors were encountered: