playwright.controller.AccordionPanel

playwright.controller.AccordionPanel(self, page, id, data_value)

Controller for shiny.express.ui.accordion_panel.

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_body Playwright Locator for the accordion panel’s body.
loc_container Playwright Locator for the container of the UI element.
loc_header Playwright Locator for the accordion panel’s header.
loc_icon Playwright Locator for the accordion panel’s icon.
loc_label Playwright Locator for the accordion panel’s label.
page Playwright Page of the Shiny app.

Methods

Name Description
expect_body Expects the accordion panel body to have the specified text.
expect_icon Expects the accordion panel icon to exist or not.
expect_label Expects the accordion panel label to have the specified text.
expect_open Expects the accordion panel to be open or closed.
expect_width Expect the width attribute of a DOM element to have a specific value.
set Sets the state of the control to open or closed.

expect_body

playwright.controller.AccordionPanel.expect_body(value, *, timeout=None)

Expects the accordion panel 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 body to appear. Defaults to None. None

expect_icon

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

Expects the accordion panel icon to exist or not.

Parameters

Name Type Description Default
exists bool True if the icon is expected to exist, False otherwise. required
timeout Timeout The maximum time to wait for the icon to appear. Defaults to None. None

expect_label

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

Expects the accordion panel label 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 label to appear. Defaults to None. None

expect_open

playwright.controller.AccordionPanel.expect_open(value, *, timeout=None)

Expects the accordion panel to be open or closed.

Parameters

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

expect_width

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

Expect the width attribute of a DOM element to have a specific value.

Parameters

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

set

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

Sets the state of the control to open or closed.

Parameters

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