browser.combo#
Functions#
cookie_banner(settings, timeout=None)
#
Standardised combination of methods to accept or decline cookies.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
settings | CookieBannerSettings | Add settings class. | required |
timeout | float | None | In seconds. Timeout to wait for element(s). If | None |
Returns:
Type | Description |
---|---|
bool | None | If |
Example
Or use succesfull handling of the cookie banner with a conditional if
statement by setting return_bool
to True
as parameter in the settings class:
Configuration Classes#
CookieBannerSettings#
Settings class for the cookie banner combo.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url | str | None | URL from where to handle the cookie banner. | None |
iframe_xpath | str | None | Use if the cookie banner is inside an iframe. If used, all other XPath elements are relative to this iframe. | None |
has_loaded_wait_seconds | float | None | Minor grace time to ensure the cookie banner has loaded. Often due an fade-in animation or similar transition. | None |
has_loaded_xpath | str | None | Check if cookie banner has loaded so it's ready for interaction. | None |
button_xpath | str | Can be for either accept or decline cookies. | required |
has_disappeared_wait_seconds | float | None | Minor grace time to ensure the cookie banner has disappeared – often due an animation – and that the cookie information has been saved before proceeding. | None |
return_bool | bool | If set to | False |