playwright.controller.NavPanel
Controller for shiny.express.ui.nav_panel.
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 nav panel. |
| loc_container | Playwright Locator for the nav panel container. |
| loc_content | Returns the locator for the content of the nav panel. |
| page | Playwright Page of the Shiny app. |
| panel_value | The data-value attribute used to identify the nav panel within the larger navset. |
Methods
| Name | Description |
|---|---|
| click | Clicks the nav panel. |
| expect_active | Expects the nav panel to be active or inactive. |
click
Clicks the nav panel.
If the nav panel is inside a dropdown, playwright will first open the dropdown before selecting the nav panel.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| timeout | Timeout |
The maximum time to wait for the nav panel to be visible and interactable. Defaults to None. |
None |
expect_active
Expects the nav panel to be active or inactive.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| value | bool | True if the nav panel is expected to be active, False otherwise. |
required |
| timeout | Timeout |
The maximum time to wait for the expectation to pass. Defaults to None. |
None |