playwright.controller.Tooltip

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

Controller for shiny.express.ui.tooltip.

Attributes

Name Description
expect Expectation method equivalent to playwright.expect(self.loc).
id The browser DOM id of the UI element.
loc Playwright Locator for the tooltip content.
loc_container Playwright Locator for the container tooltip.
loc_overlay_body Playwright Locator for the overlay body.
loc_overlay_container Playwright Locator for the overlay container.
loc_trigger Playwright Locator for the trigger element.
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.
get_loc_overlay_container Returns the locator for the overlay container.
set Sets the state of the tooltip.

expect_active

playwright.controller.Tooltip.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.Tooltip.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.Tooltip.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.

get_loc_overlay_container

playwright.controller.Tooltip.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.Tooltip.set(open, timeout=None)

Sets the state of the tooltip.

Parameters

open: bool

True to open the tooltip and False to close it.

timeout: Timeout = None

The maximum time to wait for the tooltip to be visible and interactable. Defaults to None.