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 have the specified text.
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

value: PatternOrStr

The expected text pattern or string.

timeout: Timeout = None

The maximum time to wait for the body to appear. Defaults to None.

expect_icon

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

Expects the accordion panel icon to have the specified text.

Parameters

value: PatternOrStr

The expected text pattern or string.

timeout: Timeout = None

The maximum time to wait for the icon to appear. Defaults to None.

expect_label

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

Expects the accordion panel label to have the specified text.

Parameters

value: PatternOrStr

The expected text pattern or string.

timeout: Timeout = None

The maximum time to wait for the label to appear. Defaults to None.

expect_open

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

Expects the accordion panel to be open or closed.

Parameters

value: bool

True if the accordion panel is expected to be open, False otherwise.

timeout: Timeout = None

The maximum time to wait for the expectation to pass. Defaults to 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

value: AttrValue

The expected value of the width attribute.

timeout: Timeout = None

The maximum time to wait for the expectation to be fulfilled. Defaults to None.

set

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

Sets the state of the control to open or closed.

Parameters

open: bool

True to open the accordion panel, False to close it.

timeout: Timeout = None

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