playwright.controller.Offcanvas
playwright.controller.Offcanvas(page, id)
Controller for shiny.express.ui.offcanvas.
Attributes
| expect |
Expectation method equivalent to playwright.expect(self.loc). |
| id |
The browser DOM id of the UI element. |
| loc |
Playwright Locator for the offcanvas root element (bslib-offcanvas#{id}). |
| loc_body |
Playwright Locator for the offcanvas body. |
| loc_close |
Playwright Locator for the close button inside the offcanvas header. |
| loc_footer |
Playwright Locator for the offcanvas footer. |
| loc_title |
Playwright Locator for the title inside the offcanvas header. |
| loc_trigger |
Playwright Locator for the trigger element(s) targeting this offcanvas panel. |
| page |
Playwright Page of the Shiny app. |
Methods
| close |
Closes the offcanvas panel. |
| expect_body |
Expects the offcanvas body to have the specified text. |
| expect_footer |
Expects the offcanvas footer to have the specified text. |
| expect_open |
Expects the offcanvas panel to be open or closed. |
| expect_placement |
Expects the offcanvas panel to have the specified placement. |
| expect_title |
Expects the offcanvas title to have the specified text. |
| open |
Opens the offcanvas panel. |
| set |
Sets the offcanvas panel to open or closed. |
close
playwright.controller.Offcanvas.close(timeout=None)
Closes the offcanvas panel.
Parameters
| timeout |
Timeout |
The maximum time to wait for the offcanvas to close. Defaults to None. |
None |
expect_body
playwright.controller.Offcanvas.expect_body(value, *, timeout=None)
Expects the offcanvas body to have the specified text.
Parameters
| value |
PatternOrStr |
The expected text pattern or string. |
required |
| timeout |
Timeout |
The maximum time to wait for the offcanvas body to appear. Defaults to None. |
None |
expect_open
playwright.controller.Offcanvas.expect_open(value, *, timeout=None)
Expects the offcanvas panel to be open or closed.
Parameters
| value |
bool |
True if the offcanvas should be open, False if it should be closed. |
required |
| timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None. |
None |
expect_placement
playwright.controller.Offcanvas.expect_placement(value, *, timeout=None)
Expects the offcanvas panel to have the specified placement.
Parameters
| value |
Literal[‘start’, ‘end’, ‘top’, ‘bottom’, ‘left’, ‘right’] |
The expected placement (“start”, “end”, “top”, “bottom”, “left”, “right”). |
required |
| timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None. |
None |
expect_title
playwright.controller.Offcanvas.expect_title(value, *, timeout=None)
Expects the offcanvas title to have the specified text.
Parameters
| value |
PatternOrStr |
The expected text pattern or string. |
required |
| timeout |
Timeout |
The maximum time to wait for the title to appear. Defaults to None. |
None |
open
playwright.controller.Offcanvas.open(timeout=None)
Opens the offcanvas panel.
Parameters
| timeout |
Timeout |
The maximum time to wait for the offcanvas to open. Defaults to None. |
None |
set
playwright.controller.Offcanvas.set(open, *, timeout=None)
Sets the offcanvas panel to open or closed.
Parameters
| open |
bool |
True to open the offcanvas, False to close it. |
required |
| timeout |
Timeout |
The maximum time to wait for the offcanvas to change state. Defaults to None. |
None |