playwright.controller.ValueBox
playwright.controller.ValueBox(self, page, id)
Controller for shiny.express.ui.value_box
.
Attributes
expect |
Expectation method equivalent to playwright.expect(self.loc) . |
id |
The browser DOM id of the UI element. |
loc |
Playwright Locator for the value box’s value. |
loc_body |
Playwright Locator for the value box body. |
loc_container |
Playwright Locator for the container of the UI element. |
loc_showcase |
Playwright Locator for the value box showcase. |
loc_title |
Playwright Locator for the value box title. |
page |
Playwright Page of the Shiny app. |
Methods
expect_body
playwright.controller.ValueBox.expect_body(value, *, timeout=None)
Expects the value box body to have specific text.
Parameters
value |
PatternOrStr | list [PatternOrStr ] |
The expected text pattern or list of patterns/strings. Note: If testing against multiple elements, text should be an array. |
required |
timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None . |
None |
expect_full_screen
playwright.controller.ValueBox.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.ValueBox.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.ValueBox.expect_height(value, *, timeout=None)
Expects the value box 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_title
playwright.controller.ValueBox.expect_title(value, *, timeout=None)
Expects the value box title to have a specific text.
Parameters
value |
PatternOrStr |
The expected text pattern or string. |
required |
timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None . |
None |
expect_value
playwright.controller.ValueBox.expect_value(value, *, timeout=None)
Expects the value box value to have a specific text.
Parameters
value |
PatternOrStr |
The expected text pattern or string. |
required |
timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None . |
None |
expect_width
playwright.controller.ValueBox.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.ValueBox.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 |