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
value: bool
-
True
if the overlay is expected to be active, False otherwise. timeout:
Timeout
= None-
The maximum time to wait for the expectation to pass. Defaults to
None
.
expect_body
playwright.controller.Popover.expect_body(value, *, timeout=None)
Expects the overlay body to have the specified text.
Parameters
value:
PatternOrStr
-
The expected text pattern or string.
timeout:
Timeout
= None-
The maximum time to wait for the overlay body to appear. Defaults to
None
.
expect_placement
playwright.controller.Popover.expect_placement(value, *, timeout=None)
Expects the overlay to have the specified placement.
Parameters
value: str
-
The expected placement value.
timeout:
Timeout
= None-
The maximum time to wait for the expectation to pass. Defaults to
None
.
expect_title
playwright.controller.Popover.expect_title(value, *, timeout=None)
Expects the popover title to have the specified text.
Parameters
value:
PatternOrStr
-
The expected text pattern or string.
timeout:
Timeout
= None-
The maximum time to wait for the popover header to appear. Defaults to
None
.
get_loc_overlay_container
playwright.controller.Popover.get_loc_overlay_container(timeout=None)
Returns the locator for the overlay container.
Parameters
timeout:
Timeout
= None-
The maximum time to wait for the overlay container to appear. Defaults to
None
.
set
playwright.controller.Popover.set(open, timeout=None)
Sets the state of the popover.
Parameters
open: bool
-
True
to open the popover andFalse
to close it. timeout:
Timeout
= None-
The maximum time to wait for the popover to be visible and interactable. Defaults to
None
.