Skip to content

Blur focus before comparing #8

@jamesehearn

Description

@jamesehearn

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions