As you often need to accept cookie consent banners before you can scrape web pages, Browserist has a standardised method to do this at scale. The CookieBannerSettings class enables you to easily share the same settings across different browsers or scripts.
Sometimes it's useful to let a flow be dependent of succesfull handling of the cookie banner. This is possible by setting return_bool to True as parameter in the settings class and using a conditional if statement in combination with the cookie banner combo. For example:
Let's expand the examples and imagine that a website can personalise the content when returning users accept cookies. We want to test whether it's working as expected. For instance: