playwright.controller.NavsetCardUnderline

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

Controller for shiny.express.ui.navset_card_underline.

Attributes

Name Description
expect Expectation method equivalent to playwright.expect(self.loc).
id The browser DOM id of the UI element.
loc Playwright Locator of the UI element.
loc_container Playwright Locator for the container of the UI element.
page Playwright Page of the Shiny app.

Methods

Name Description
expect_nav_titles Expects the control to have the specified nav titles.
expect_nav_values Expects the control to have the specified nav values.
expect_placement Expects the navset to have the specified placement.
expect_sidebar Assert whether or not the sidebar exists within the navset.
expect_title Expects the navset title to have the specified text.
expect_value Expects the control to have the specified value.
get_loc_active_content Returns the locator for the active content.
nav_panel Returns the nav panel (NavPanel) with the specified value.
set Sets the state of the control to open or closed.

expect_nav_titles

playwright.controller.NavsetCardUnderline.expect_nav_titles(
    value,
    *,
    timeout=None,
)

Expects the control to have the specified nav titles.

Parameters

Name Type Description Default
value list[PatternOrStr] The expected nav titles. required
timeout Timeout The maximum time to wait for the expectation to pass. Defaults to None. None

expect_nav_values

playwright.controller.NavsetCardUnderline.expect_nav_values(
    value,
    *,
    timeout=None,
)

Expects the control to have the specified nav values.

Parameters

Name Type Description Default
value list[PatternOrStr] The expected nav values. required
timeout Timeout The maximum time to wait for the expectation to pass. Defaults to None. None

expect_placement

playwright.controller.NavsetCardUnderline.expect_placement(
    location='above',
    *,
    timeout=None,
)

Expects the navset to have the specified placement.

Parameters

Name Type Description Default
location Literal[‘above’, ‘below’] The expected placement location. Defaults to 'above'. 'above'
timeout Timeout The maximum time to wait for the expectation to pass. Defaults to None. None

expect_sidebar

playwright.controller.NavsetCardUnderline.expect_sidebar(
    exists,
    *,
    timeout=None,
)

Assert whether or not the sidebar exists within the navset.

Parameters

Name Type Description Default
exists bool True if the sidebar exists within the navset. required
timeout Timeout The maximum time to wait for the expectation to pass. Defaults to None. None

expect_title

playwright.controller.NavsetCardUnderline.expect_title(value, *, timeout=None)

Expects the navset title to have the specified text.

Parameters

Name Type Description Default
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.NavsetCardUnderline.expect_value(value, *, timeout=None)

Expects the control to have the specified value.

Parameters

Name Type Description Default
value PatternOrStr The expected value. required
timeout Timeout The maximum time to wait for the expectation to pass. Defaults to None. None

get_loc_active_content

playwright.controller.NavsetCardUnderline.get_loc_active_content(timeout=None)

Returns the locator for the active content.

Parameters

Name Type Description Default
timeout Timeout The maximum time to wait for the locator to appear. Defaults to None. None

nav_panel

playwright.controller.NavsetCardUnderline.nav_panel(value)

Returns the nav panel (NavPanel) with the specified value.

Parameters

Name Type Description Default
value str The value of the nav panel. required

set

playwright.controller.NavsetCardUnderline.set(value, *, timeout=None)

Sets the state of the control to open or closed.

Parameters

Name Type Description Default
value str The selected nav item. required