playwright.controller.Sidebar

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

Controller for shiny.express.ui.sidebar.

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 sidebar.
loc_container Playwright Locator for the sidebar layout.
loc_handle Playwright Locator for the open/close handle of the sidebar.
loc_position Playwright Locator for the position of the sidebar.
page Playwright Page of the Shiny app.

Methods

Name Description
expect_handle Asserts that the sidebar handle exists or does not exist.
expect_open Expect the sidebar to be open or closed.
expect_position Asserts that the sidebar is in the expected position.
expect_text Asserts that the sidebar has the expected text.
expect_width Expect the width attribute of a DOM element to have a specific value.
set Sets the sidebar to be open or closed.

expect_handle

playwright.controller.Sidebar.expect_handle(exists, *, timeout=None)

Asserts that the sidebar handle exists or does not exist.

Parameters

exists: bool

True if the sidebar open/close handle should exist, False otherwise.

timeout: Timeout = None

The maximum time to wait for the sidebar handle to appear. Defaults to None.

expect_open

playwright.controller.Sidebar.expect_open(value, *, timeout=None)

Expect the sidebar to be open or closed.

Parameters

value: bool

True if the sidebar should be open, False to be closed.

timeout: Timeout = None

The maximum time to wait for the sidebar to open or close. Defaults to None.

expect_position

playwright.controller.Sidebar.expect_position(value, *, timeout=None)

Asserts that the sidebar is in the expected position.

Parameters

value: Literal[‘left’, ‘right’]

The expected position of the sidebar.

timeout: Timeout = None

The maximum time to wait for the sidebar to appear. Defaults to None.

expect_text

playwright.controller.Sidebar.expect_text(value, *, timeout=None)

Asserts that the sidebar has the expected text.

Parameters

value: PatternOrStr

The expected text in the sidebar.

timeout: Timeout = None

The maximum time to wait for the text to appear. Defaults to None.

expect_width

playwright.controller.Sidebar.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

playwright.controller.Sidebar.set(open, *, timeout=None)

Sets the sidebar to be open or closed.

Parameters

open: bool

True to open the sidebar and False to close it.

timeout: Timeout = None

The maximum time to wait for the sidebar to open or close. Defaults to None.