playwright.controller.Accordion
playwright.controller.Accordion(self, page, id)
Controller for shiny.express.ui.accordion
.
Attributes
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
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
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
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
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
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
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
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
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 |