wdio-visual-regression-service
wdio-visual-regression-service copied to clipboard
endY is out of range - Chrome
Environment
package.json
"devDependencies": {
"selenium-standalone": "^6.11.0",
"wdio-mocha-framework": "^0.5.11",
"wdio-screenshot": "^0.6.0",
"wdio-selenium-standalone-service": "0.0.9",
"wdio-visual-regression-service": "^0.8.0",
"webdriverio": "^4.8.0"
},
wdio.conf
...
plugins: {
'wdio-screenshot': {}
},
services: [
'selenium-standalone',
'visual-regression'
],
visualRegression: {
compare: new VisualRegressionCompare.LocalCompare({
referenceName: getScreenshotName(path.join(process.cwd(), 'screenshots/reference')),
screenshotName: getScreenshotName(path.join(process.cwd(), 'screenshots/screen')),
diffName: getScreenshotName(path.join(process.cwd(), 'screenshots/diff')),
misMatchTolerance: 3,
}),
viewportChangePause: 300,
viewports: [{
width: 320,
height: 500
}, {
width: 1024,
height: 800
}],
orientations: ['landscape', 'portrait'],
},
...
Problem: I'm trying to take a Screen Shot of a footer element.
it("Affiliate-Footer", function() {
browser.waitForVisible(".floor-cta");
const report = browser.checkElement(".FtrBlock");
isWithinMisMatchTolerance(report);
});
The test works on FireFox but is failing on Chrome v63.
Error Message
'endY is out of range'
I tried changing width and height sizes and its still not working. Any suggestions?
would seem your element is indeed outside viewport - can you scroll, zoom, move the footer fully into view? if not - talk to your folks not to render it outside the viewport