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_class Expects the accordion to have the specified class.
expect_height Expects the accordion to have the specified height.
expect_multiple Expects the accordion to be multiple or not.
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

Name Type Description Default
data_value str The data value of the accordion panel. required

expect_class

playwright.controller.Accordion.expect_class(class_name, *, timeout=None)

Expects the accordion to have the specified class.

Parameters

Name Type Description Default
class_name str The class name to expect. required
timeout Timeout The maximum time to wait for the class to appear. Defaults to None. None

expect_height

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

Expects the accordion to have the specified height.

Parameters

Name Type Description Default
value StyleValue The expected height. required
timeout Timeout The maximum time to wait for the height to be visible and interactable. Defaults to None. None

expect_multiple

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

Expects the accordion to be multiple or not.

Parameters

Name Type Description Default
value bool True if the accordion is expected to be multiple, False otherwise. required
timeout Timeout The maximum time to wait for the expectation to pass. Defaults to None. None

expect_panels

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

Expects the accordion to have the specified panels.

Parameters

Name Type Description Default
value list[PatternOrStr] The expected panels. required
timeout Timeout The maximum time to wait for the panels to be visible and interactable. Defaults to None. None

expect_width

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

Expects the accordion to have the specified width.

Parameters

Name Type Description Default
value StyleValue The expected width. required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

set

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

Sets the state of the accordion panel.

Parameters

Name Type Description Default
open str | list[str] The open accordion panel(s). required
timeout Timeout The maximum time to wait for the accordion panel to be visible and interactable. Defaults to None. None