playwright.controller.ToolbarInputButton

playwright.controller.ToolbarInputButton(page, id)

Controller for shiny.express.ui.toolbar_input_button.

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_icon Playwright Locator for the button’s icon element.
loc_label Playwright Locator for the button’s label element.
page Playwright Page of the Shiny app.

Methods

Name Description
click Clicks the input action.
expect_border Expect the toolbar button to have a border.
expect_disabled Expect the toolbar button to be disabled.
expect_icon Expect the toolbar button to have an icon.
expect_icon_visible Expect the icon to be visible.
expect_label Expect the label text of the toolbar button.
expect_label_visible Expect the label to be visible or hidden.

click

playwright.controller.ToolbarInputButton.click(timeout=None, **kwargs)

Clicks the input action.

Parameters

Name Type Description Default
timeout Timeout The maximum time to wait for the input action to be clicked. Defaults to None. None

expect_border

playwright.controller.ToolbarInputButton.expect_border(
    has_border,
    *,
    timeout=None,
)

Expect the toolbar button to have a border.

Parameters

Name Type Description Default
has_border bool Whether the button should have a border. required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_disabled

playwright.controller.ToolbarInputButton.expect_disabled(value, *, timeout=None)

Expect the toolbar button to be disabled.

Parameters

Name Type Description Default
value bool Whether the button should be disabled. required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_icon

playwright.controller.ToolbarInputButton.expect_icon(
    exists=True,
    *,
    timeout=None,
)

Expect the toolbar button to have an icon.

Parameters

Name Type Description Default
exists bool Whether the icon should exist. True
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_icon_visible

playwright.controller.ToolbarInputButton.expect_icon_visible(
    visible=True,
    *,
    timeout=None,
)

Expect the icon to be visible.

Parameters

Name Type Description Default
visible bool Whether the icon should be visible. True
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_label

playwright.controller.ToolbarInputButton.expect_label(value, *, timeout=None)

Expect the label text of the toolbar button.

Parameters

Name Type Description Default
value PatternOrStr The expected label text (exact string or regex pattern). required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_label_visible

playwright.controller.ToolbarInputButton.expect_label_visible(
    visible,
    *,
    timeout=None,
)

Expect the label to be visible or hidden.

Parameters

Name Type Description Default
visible bool Whether the label should be visible. required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None