You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A problem that I run into is that sometimes the blinking cursor is displayed when the image is created form the web page to be tested, so false positives are sometimes displayed. Worse is that these false positives are intermittent, depending on the exact time the image is created.
What's needed is some kind of way to remove the blinking cursor form the page so it's in an identical state each time.
What I've been doing that has worked so far is (since I'm using this with Selenium) to have Selenium execute document.activeElement.blur(). That removes the focus form the page entirely, right? My JavaScript is a bit rusty/lacking.
Would be even better to have this as a ComparisonOption, that runs the blur JS command before the image is saved, I think.
Anybody else have this issue?
I imagine there are circumstances when you'd want the focus on the page to compare as well, but not for my current project.
Will work on this myself, and let you know if anything comes of it. Thanks for letting me take part!
The text was updated successfully, but these errors were encountered:
Unfortunately I've not got an IDE setup at the moment to contribute but will try do so soon. Having tried the above .blur() script within the console of DevTools it seems to work.
I remember previously having issues with the cursor blinking but never looked in to it much.
Perhaps what you could do is before it takes the snapshot just use the following to execute the javascript?
driver.ExecuteJavaScript('document.activeElement.blur();');
For sure, that's what I'm doing now. No problem making it work like that, just trying to slim down the amount of duplicate code & such. Didn't know how much of a problem it was for others as well.
A problem that I run into is that sometimes the blinking cursor is displayed when the image is created form the web page to be tested, so false positives are sometimes displayed. Worse is that these false positives are intermittent, depending on the exact time the image is created.
What's needed is some kind of way to remove the blinking cursor form the page so it's in an identical state each time.
What I've been doing that has worked so far is (since I'm using this with Selenium) to have Selenium execute document.activeElement.blur(). That removes the focus form the page entirely, right? My JavaScript is a bit rusty/lacking.
Would be even better to have this as a ComparisonOption, that runs the blur JS command before the image is saved, I think.
Anybody else have this issue?
I imagine there are circumstances when you'd want the focus on the page to compare as well, but not for my current project.
Will work on this myself, and let you know if anything comes of it. Thanks for letting me take part!
The text was updated successfully, but these errors were encountered: