Open marcelas opened 6 years ago
@zinserjan do you have a recommendation for this?
I'm also experiencing this, but only when running headless chrome. I think this issue actually lies within wdio-screenshot, because that's the plugin which takes the screenshot. I haven't got a solution for it yet. @marcelas: are you running headless chrome as well?
I have been experience this as well, if you have an idea of the resized position, you can move your mouse to the location before the screenshot (sometimes) and it will appear as the correct position during the checkElement resizes. This is a bit of a hack IMO, and doesn't always seem to work as expected but if screenshot pages are not expected to change much it may be an option
I have an issue that on CI sometimes one element will be hover over and it will make the taken screenshot not match. I tried using moveToObject before checkElement, but seems like inside the screenshot call on wdio-screenshot, there is a lot of resizing that invalidates the move movement. I tried doing the move inside a beforeCommand hook for the browser.screenshot call, but that never gets called for any of the browser calls under checkElement. What is the recommended way to ensure the mouse position for a consistent screenshot?
Thanks