playwright.controller.Popover

playwright.controller.Popover(self, page, id)

Controller for shiny.express.ui.popover.

Attributes

Name Description
expect Expectation method equivalent to playwright.expect(self.loc).
id The browser DOM id of the UI element.
loc Playwright Locator of the UI element.
loc_overlay_body Playwright Locator for the popover body.
loc_overlay_container Playwright Locator for the popover container.
loc_trigger Playwright Locator for the trigger element that opens/closes the popover.
page Playwright Page of the Shiny app.

Methods

Name Description
expect_active Expects the overlay to be active or inactive.
expect_body Expects the overlay body to have the specified text.
expect_placement Expects the overlay to have the specified placement.
expect_title Expects the popover title to have the specified text.
get_loc_overlay_container Returns the locator for the overlay container.
set Sets the state of the popover.

expect_active

playwright.controller.Popover.expect_active(value, *, timeout=None)

Expects the overlay to be active or inactive.

Parameters

Name Type Description Default
value bool True if the overlay is expected to be active, False otherwise. required
timeout Timeout The maximum time to wait for the expectation to pass. Defaults to None. None

expect_body

playwright.controller.Popover.expect_body(value, *, timeout=None)

Expects the overlay body to have the specified text.

Parameters

Name Type Description Default
value PatternOrStr The expected text pattern or string. required
timeout Timeout The maximum time to wait for the overlay body to appear. Defaults to None. None

expect_placement

playwright.controller.Popover.expect_placement(value, *, timeout=None)

Expects the overlay to have the specified placement.

Parameters

Name Type Description Default
value str The expected placement value. required
timeout Timeout The maximum time to wait for the expectation to pass. Defaults to None. None

expect_title

playwright.controller.Popover.expect_title(value, *, timeout=None)

Expects the popover title to have the specified text.

Parameters

Name Type Description Default
value PatternOrStr The expected text pattern or string. required
timeout Timeout The maximum time to wait for the popover header to appear. Defaults to None. None

get_loc_overlay_container

playwright.controller.Popover.get_loc_overlay_container(timeout=None)

Returns the locator for the overlay container.

Parameters

Name Type Description Default
timeout Timeout The maximum time to wait for the overlay container to appear. Defaults to None. None

set

playwright.controller.Popover.set(open, timeout=None)

Sets the state of the popover.

Parameters

Name Type Description Default
open bool True to open the popover and False to close it. required
timeout Timeout The maximum time to wait for the popover to be visible and interactable. Defaults to None. None