workeffortwaste / layout-shift-gif

Visualise the Core Web Vitals metric Cumulative Layout Shift (CLS) with a simple GIF.
https://defaced.dev/tools/layout-shift-gif-generator/
Apache License 2.0
149 stars 15 forks source link

Cookie prompts / pop-up windows #12

Closed krystof-k closed 1 week ago

krystof-k commented 11 months ago

It'd be great if you try to close the cookie prompts / pop-up windows (or being able to specify which element to click). E.g.:

image

workeffortwaste commented 1 week ago

It's possible to skip these by supplying your own compatible cookie file in JSON format.

I recommend this extension for Chrome: https://chromewebstore.google.com/detail/export-cookie-json-file-f/nmckokihipjgplolmcmjakknndddifde?hl=en

Visit the website in your usual browser, accept the cookies, and use the extension to export the cookies as JSON.

You can then usse the following command and it will import the cookies and bypass the CMP.

layout-shift-gif --url <url> --cookies ./cookies.json