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

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

get_loc_overlay_container

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

Sets the state of the tooltip.

Parameters

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