playwright.controller.ValueBox

playwright.controller.ValueBox(self, page, id)

Controller for shiny.express.ui.value_box.

Attributes

Name Description
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

Name Description
expect_body Expects the value box body to have specific text.
expect_full_screen Verifies if the full screen mode is currently open.
expect_full_screen_available Expects whether full screen mode is available for the element.
expect_height Expects the value box to have a specific height.
expect_title Expects the value box title to have a specific text.
expect_value Expects the value box value to have a specific text.
expect_width Expect the width attribute of a DOM element to have a specific value.
set_full_screen Sets the element to full screen mode or exits full screen mode.

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.

timeout: Timeout = None

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

timeout: Timeout = None

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

timeout: Timeout = None

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

timeout: Timeout = None

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

timeout: Timeout = None

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

timeout: Timeout = None

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

timeout: Timeout = None

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

timeout: Timeout = None

The maximum time to wait for the operation to complete. Defaults to None.