Open mansn opened 8 years ago
Sorry for the late response.
I'm using
"wdio-visual-regression-service": "0.4.0"
. The problem below doesn't occur on version0.2.0
.
The version of wdio-visual-regression-service
is not important, cause the screenshot taking funtionally is provided by wdio-screenshot
.
I can't reproduce your problem. Works fine for me. But this is may due to different browser versions...
Can you start your tests with the environment variable `DEBUG=wdio-screenshot:*`` and post the logs?
No problem. I'll re-run this as soon as I can and get the logs for you.
@zinserjan Yes, you are right. Maybe this issue belongs to wdio-screenshot
. I could see that "wdio-visual-regression-service": "0.2.0"
is using wdio-screenshot
version 0.1.0
. And "wdio-visual-regression-service": "0.4.0"
is using wdio-screenshot
version 0.2.0
.
Maybe I also should try using the latest version of wdio-screenshot
, with the latest version of wdio-visual-regression-service
.
I'll get back to you, thanks!
I'm getting the same error message but for only one section which is the footer and it is happening on both pages in my test.
I am using the latest version of both wdio-screenshot and wdio-visual-regression-service.
Hi, I got same error. Here with some information
wdio-screenshot:image Use image processing library: GraphicsMagick +0ms
wdio-screenshot:image Use image processing library: GraphicsMagick +0ms
wdio-screenshot:image Use image processing library: GraphicsMagick +88ms
wdio-screenshot:makeElementScreenshot start element screenshot +4s
wdio-screenshot:beforeScreenshot hide scrollbars +1ms
wdio-screenshot:beforeScreenshot trigger resize event to allow js components to resize properly +11ms
wdio-screenshot:beforeScreenshot scroll back to start x: 0, y: 0 +15ms
wdio-screenshot:beforeScreenshot wait 200 ms for browser render +10ms
wdio-screenshot:makeAreaScreenshot requested a screenshot for the following area: {"startX":16,"startY":485,"endX":752,"endY":873} +228ms
wdio-screenshot:makeAreaScreenshot detected screenDimensions {"html":{"scrollHeight":758,"clientWidth":768,"clientHeight":758,"offsetHeight":758,"scrollWidth":768},"window":{"innerWidth":768,"orientation":0,"screenWidth":1440,"innerHeight":758,"pixelRatio":2,"screenHeight":900},"body":{"scrollHeight":758,"offsetHeight":758}} +11ms
wdio-screenshot:ScreenshotStrategyManager use merge viewport strategy +1ms
this is my test file
import assert from 'assert';
const widths = [768];
function assertDiff(results) {
results.forEach(result => assert.ok(result.isExactSameImage));
}
describe('insights', () => {
it('conversions', () => {
browser.url('/my-page');
/* move scroll to top of the element*/
const target = '.just-a-class-name-that-exist';
const element = $(target);
element.scroll();
const report = browser.checkElement(target, {
widths,
});
assertDiff(report);
});
});
same code works for 1600
as width,
This log {"startX":16,"startY":485,"endX":752,"endY":873}
is kinda accurate and points to the element that I have on page.
And looking at height of the viewport, it makes sense why we get an error, 873
is greater than 758
{
"html":{
"scrollHeight":758,
"clientWidth":768,
"clientHeight":758,
"offsetHeight":758,
"scrollWidth":768
},
"window":{
"innerWidth":768,
"orientation":0,
"screenWidth":1440,
"innerHeight":758,
"pixelRatio":2,
"screenHeight":900
},
"body":{
"scrollHeight":758,
"offsetHeight":758
}
}
I'm using
"wdio-visual-regression-service": "0.4.0"
. The problem below doesn't occur on version0.2.0
.I'm trying
browser.checkElement('#main', widths: [360, 375]);
on the following page: http://www.ving.se/inspiration/asien/thailand/siamThe test goes fine for the first 360px screenshot, but it fails on the second 375px test. It looks like it fails straight away when starting with 375px. However, if I change the widths to like [360, 1024], then it works without any issues.
Any idea why this is?
Error log: