waft.actions.system_actions.browser_actions module

class waft.actions.system_actions.browser_actions.BrowserActions(node: BaseNode)

Bases: object

Class is a facade for instances related to a browser test systems

property browser_session: Generator[Browser, Any, None]

This context manager will provide an instance of a playwright session on the test node and perform all necessary setup and teardown

is_dns_blocked(domain: str, retry_on: Literal['blocked', 'unblocked'] | None, timeout: int = 180) bool

Return a boolean indicating if the given domain is blocked by DNS policy

Parameters:
  • domain – URL string of domain to check for being blocked

  • retry_on – Argument to retry based on the returned value (wait <timeout> seconds for a given outcome)

  • timeout – Max time to retry for (default 30 seconds)

is_http_blocked(domain: str, retry_on: Literal['blocked', 'unblocked'] | None, timeout: int = 180) bool

Return a boolean indicating if the given domain is blocked by HTTP policy

Parameters:
  • domain – URL string of domain to check for being blocked

  • retry_on – Argument to retry based on the returned value (wait <timeout> seconds for a given outcome)

  • timeout – Max time to retry for (default 30 seconds)