Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Biggest pitfalls and problems using WebdriverCSS #151

Open
christian-bromann opened this issue May 9, 2016 · 3 comments
Open

Biggest pitfalls and problems using WebdriverCSS #151

christian-bromann opened this issue May 9, 2016 · 3 comments

Comments

@christian-bromann
Copy link
Contributor

Please let me know what is most annoying about using WebdriverCSS and what should be changed/improved.

Thanks!

@kevinlambert
Copy link

viewportChangePause

We have come across rendering issues when using multiple breakpoints. When WebdriverCSS resizes the window - images, fonts, content are resized. It can take a while for the browser to re-paint. However WebdriverCSS takes the screenshot before the browser has finished rendering properly. This tends to be more of an issue with images but fonts can be problematic too.

The result is rendering is inconsistent between test runs. This is particularly noticeable between taking the baseline and the next test run.

Our solution was to add a viewportChangePause property to the config file. This allows for the browser to pause for a number of milliseconds in order to render fully.

    plugins: {
        webdrivercss: {
            screenshotRoot: 'myTest',
            failedComparisonsRoot: 'myTest/diff',
            screenWidth: [340, 480, 800, 1200],
            misMatchTolerance: 0.10,
            viewportChangePause: 800
        }
    },

Code:
kevinlambert@08c4070

kevinlambert@23fd34d

kevinlambert@8852d32

@Blackbaud-PatrickOFriel

When taking a screenshot, when I have specified a screenWidth, Every test calls setViewportWidth, even if they are all set to something like 1280px (the width doesn't change between tests). This adds significant time to every run.

Also, when the screen resizes, it tends to grow and shrink, which can mess up whatever click or hover or other event that was launched before webdrivercss was called.

You should also be able to specify automatic screenshot name prefixes for different browsers. If you are running these tests in browserstack in both firefox and chrome, then not having the prefixes will cause incorrect comparisons to occur.

@Jointts
Copy link

Jointts commented Jul 15, 2016

Why is not the fix from kevinlambert implemented? The fact that multiple screen widths produce incorrect results should be an critical error for this library.

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

No branches or pull requests

4 participants