playwright.controller.Accordion

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

Controller for shiny.express.ui.accordion.

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 each accordion items.
loc_container Playwright Locator for the accordion container.
page Playwright Page of the Shiny app.

Methods

Name Description
accordion_panel Returns the accordion panel (AccordionPanel) with the specified data value.
expect_height Expects the accordion to have the specified height.
expect_panels Expects the accordion to have the specified panels.
expect_width Expects the accordion to have the specified width.
set Sets the state of the accordion panel.

accordion_panel

playwright.controller.Accordion.accordion_panel(data_value)

Returns the accordion panel (AccordionPanel) with the specified data value.

Parameters

data_value: str

The data value of the accordion panel.

expect_height

playwright.controller.Accordion.expect_height(value, *, timeout=None)

Expects the accordion to have the specified height.

Parameters

value: StyleValue

The expected height.

timeout: Timeout = None

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

expect_panels

playwright.controller.Accordion.expect_panels(value, *, timeout=None)

Expects the accordion to have the specified panels.

Parameters

value: list[PatternOrStr]

The expected panels.

timeout: Timeout = None

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

expect_width

playwright.controller.Accordion.expect_width(value, *, timeout=None)

Expects the accordion to have the specified width.

Parameters

value: StyleValue

The expected width.

timeout: Timeout = None

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

set

playwright.controller.Accordion.set(open, *, timeout=None)

Sets the state of the accordion panel.

Parameters

open: str | list[str]

The open accordion panel(s).

timeout: Timeout = None

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