playwright.controller.Card
playwright.controller.Card(self, page, id)
Controller for shiny.express.ui.card
.
Attributes
expect |
Expectation method equivalent to playwright.expect(self.loc) . |
id |
The browser DOM id of the UI element. |
loc |
Playwright Locator for the card’s value. |
loc_body |
Playwright Locator for the card body. |
loc_container |
Playwright Locator for the card container. |
loc_footer |
Playwright Locator for the card footer. |
loc_title |
Playwright Locator for the card title. |
page |
Playwright Page of the Shiny app. |
Methods
expect_body
playwright.controller.Card.expect_body(value, *, timeout=None)
Expect the card body element to have the specified text.
Parameters
value |
PatternOrStr | list [PatternOrStr ] |
The expected text or a list of expected texts. |
required |
timeout |
Timeout |
The maximum time to wait for the text to appear. Defaults to None . |
None |
expect_full_screen
playwright.controller.Card.expect_full_screen(value, *, timeout=None)
Verifies if the full screen mode is currently open.
Parameters
value |
bool |
True if the item is to be in full screen mode, False otherwise. |
required |
timeout |
Timeout |
The maximum time to wait for the verification. Defaults to None . |
None |
expect_full_screen_available
playwright.controller.Card.expect_full_screen_available(value, *, timeout=None)
Expects whether full screen mode is available for the element.
Parameters
value |
bool |
True if the element is expected to be available for full screen mode, False otherwise. |
required |
timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None . |
None |
expect_height
playwright.controller.Card.expect_height(value, *, timeout=None)
Expects the card to have a specific height.
Parameters
value |
StyleValue |
The expected height value. |
required |
timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None . |
None |
expect_max_height
playwright.controller.Card.expect_max_height(value, *, timeout=None)
Expects the card to have a specific maximum height.
Parameters
value |
StyleValue |
The expected maximum height value. |
required |
timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None . |
None |
expect_min_height
playwright.controller.Card.expect_min_height(value, *, timeout=None)
Expects the card to have a specific minimum height.
Parameters
value |
StyleValue |
The expected minimum height value. |
required |
timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None . |
None |
expect_width
playwright.controller.Card.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. |
required |
timeout |
Timeout |
The maximum time to wait for the expectation to be fulfilled. Defaults to None . |
None |
set_full_screen
playwright.controller.Card.set_full_screen(open, *, timeout=None)
Sets the element to full screen mode or exits full screen mode.
Parameters
open |
bool |
True to open the element in full screen mode, False to exit full screen mode. |
required |
timeout |
Timeout |
The maximum time to wait for the operation to complete. Defaults to None . |
None |