Additional Abilities

ScreenPy Playwright adds one additional Ability, which enables Actors to use Playwright to browse the web.

BrowseTheWebSynchronously

class BrowseTheWebSynchronously(browser: Browser | BrowserContext)

Use a synchronous Playwright instance to browse the web.

Examples:

the_actor.can(BrowseTheWebSynchronously.using_firefox())

the_actor.can(BrowseTheWebSynchronously.using_webkit())

the_actor.can(BrowseTheWebSynchronously.using_chromium())

the_actor.can(
    BrowseTheWebSynchronously.using(playwright, cust_browser)
)
classmethod using(playwright: Playwright, browser: Browser | BrowserContext) SelfBrowseTheWebSynchronously

Supply a pre-defined Playwright browser to use.

classmethod using_firefox() SelfBrowseTheWebSynchronously

Use a synchronous Firefox browser.

classmethod using_chromium() SelfBrowseTheWebSynchronously

Use a synchronous Chromium (i.e. Chrome, Edge, Opera, etc.) browser.

classmethod using_webkit() BrowseTheWebSynchronously

Use a synchronous WebKit (i.e. Safari, etc.) browser.