Skip to content
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

Unable to set mouse position before screenshot #61

Open
marcelas opened this issue Jan 18, 2018 · 3 comments
Open

Unable to set mouse position before screenshot #61

marcelas opened this issue Jan 18, 2018 · 3 comments

Comments

@marcelas
Copy link

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

@marcelas
Copy link
Author

@zinserjan do you have a recommendation for this?

@mansn
Copy link

mansn commented Jan 25, 2018

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?

@emilyrohrbough
Copy link

emilyrohrbough commented Mar 1, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants