-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BaseStrategy.setScrollArea endY is out of range #66
Comments
I am still getting this error but only occasionally. Do you have any idea why this might be happening? |
@GaryAlway I'm guessing that this relates to zinserjan/wdio-screenshot/pull/54. Not sure if it's going to get merged though, sounds like there might be some other solution being built. |
Currently, when using the wdio-visual-regression service, when using checkElement() and an element is larger than the viewport, the screenshot fails because the BaseStrategy attempts to scroll the element in view. The error outputs are a bit unclear as to why until digging through code. Outputs typically received:
or
I have logged an issue to add an additional option to "crop" the element screenshot at the viewport edge: #87 |
re: BaseStrategy.js
I updated the following code in order to debug your library as I was getting an exception when saving full document screenshots.
} else if (endY > documentHeight) { throw new Error(
${endY} is out of range ${documentHeight}); }
The output is as follows:
Error: 2030 is out of range 2029
at MergeScreenshotStrategy.setScrollArea (node_modules/wdio-screenshot/lib/utils/strategies/BaseStrategy.js:48:15)
at makeAreaScreenshot$ (node_modules/wdio-screenshot/lib/modules/makeAreaScreenshot.js:85:30)
at tryCatch (node_modules/regenerator-runtime/runtime.js:64:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:355:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:116:21)
at tryCatch (node_modules/regenerator-runtime/runtime.js:64:40)
at invoke (node_modules/regenerator-runtime/runtime.js:154:20)
at node_modules/regenerator-runtime/runtime.js:164:13
at process._tickDomainCallback (internal/process/next_tick.js:129:7)
The text was updated successfully, but these errors were encountered: