wdio-screenshot
wdio-screenshot copied to clipboard
WIP: Migration to WebdriverIO 5
Working properly migration to WebdriverIO version 5.
This will be a MVB. Has any of the issues logged been considered for other breaking changes in this tool?
I am refactoring test now, but there is major issue with that:
In old webdriverIO 4 we had browser.setViewportSize()
function which setup viewport size of browser so all reference screenshots was valid for tests, now we have browser.setWindowSize()
which setups i belive windo size and viewport is different for each browser i.e data from comparison in tests:
[0-0] { isSameDimensions: false, dimensionDifference: { width: 0, height: 19 }, misMatchPercentage: '0.00', analysisTime: 33, getDiffImage: [Function] } [1-0] { isSameDimensions: false, dimensionDifference: { width: 0, height: 14 }, misMatchPercentage: '0.00', analysisTime: 33, getDiffImage: [Function] } [0-0] { isSameDimensions: false, dimensionDifference: { width: 0, height: -1 }, misMatchPercentage: '0.00', analysisTime: 111, getDiffImage: [Function] } 2019-03-26T15:22:31.674Z DEBUG @wdio/local-runner: Runner 0-0 finished with exit code 1 [1-0] { isSameDimensions: false, dimensionDifference: { width: 0, height: -6 }, misMatchPercentage: '0.00', analysisTime: 144, getDiffImage: [Function] }
Check dimension difference, two different browsers for runs for two different viewport dimensions, every time we had different output.
Update:
All unit tests passing on CI tools as well on local, integration test are failing. The only problem now is different implementation/logic in method browser.setVieport
(WDIO4) vs browser.setWindowSize()
(WDIO5). Will prepare workaround for that, it will extend integration test time a little bit.
The only option is changing windowsize untill we achieve proper viewport.
I created a port of the old wdio4 browser.setViewport
functionality: https://github.com/mondata-dev/wdio-viewport-size, maybe this helps in driving this forward?
What is the state of this PR, do you have a working version for wdio 5?