playwright.controller.PageNavbar
playwright.controller.PageNavbar(page, id )
Controller for shiny.express.ui.page_navbar
.
Attributes
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
expect_bg
Expects the navset bar to have the specified background color.
expect_fillable
Expects the main content area to be considered a fillable (i.e., flexbox) container
expect_fillable_mobile
Expects the main content area to be considered a fillable (i.e., flexbox) container on mobile This method will always call .expect_fillable(True)
first to ensure the fillable property is set
expect_fluid
Expects the navset bar to have a fluid or fixed layout.
expect_gap
Expects the navset bar to have the specified gap.
expect_inverse
Expects the navset bar to be light text color if inverse is True
expect_lang
Expects the HTML tag to have the specified language.
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_position
Expects the navset bar to have the specified position.
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.
expect_window_title
Expects the window title to have the specified text.
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_bg
playwright.controller.PageNavbar.expect_bg(bg, * , timeout= None )
Expects the navset bar to have the specified background color.
Parameters
bg
PatternOrStr
The expected background color.
required
timeout
Timeout
The maximum time to wait for the expectation to pass. Defaults to None
.
None
expect_fillable
playwright.controller.PageNavbar.expect_fillable(value, * , timeout= None )
Expects the main content area to be considered a fillable (i.e., flexbox) container
Parameters
value
bool
True
if the main content area is expected to be fillable, False
otherwise.
required
timeout
Timeout
The maximum time to wait for the expectation to pass. Defaults to None
.
None
expect_fillable_mobile
playwright.controller.PageNavbar.expect_fillable_mobile(value, * , timeout= None )
Expects the main content area to be considered a fillable (i.e., flexbox) container on mobile This method will always call .expect_fillable(True)
first to ensure the fillable property is set
Parameters
value
bool
True
if the main content area is expected to be fillable on mobile, False
otherwise.
required
timeout
Timeout
The maximum time to wait for the expectation to pass. Defaults to None
.
None
expect_fluid
playwright.controller.PageNavbar.expect_fluid(value, * , timeout= None )
Expects the navset bar to have a fluid or fixed layout.
Parameters
value
bool
True
if the layout is fluid
or False
if it is fixed
.
required
timeout
Timeout
The maximum time to wait for the expectation to pass. Defaults to None
.
None
expect_gap
playwright.controller.PageNavbar.expect_gap(gap, * , timeout= None )
Expects the navset bar to have the specified gap.
Parameters
gap
PatternOrStr
The expected gap.
required
timeout
Timeout
The maximum time to wait for the expectation to pass. Defaults to None
.
None
expect_inverse
playwright.controller.PageNavbar.expect_inverse(value, * , timeout= None )
Expects the navset bar to be light text color if inverse is True
Parameters
value
bool
True
if the navset bar is expected to have inverse text color, False
otherwise.
required
timeout
Timeout
The maximum time to wait for the expectation to pass. Defaults to None
.
None
expect_lang
playwright.controller.PageNavbar.expect_lang(lang, * , timeout= None )
Expects the HTML tag to have the specified language.
Parameters
lang
PatternOrStr
The expected language.
required
timeout
Timeout
The maximum time to wait for the expectation to pass. Defaults to None
.
None
expect_nav_titles
playwright.controller.PageNavbar.expect_nav_titles(value, * , timeout= None )
Expects the control to have the specified nav titles.
Parameters
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.PageNavbar.expect_nav_values(value, * , timeout= None )
Expects the control to have the specified nav values.
Parameters
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_position
playwright.controller.PageNavbar.expect_position(
position= 'static-top' ,
* ,
timeout= None ,
)
Expects the navset bar to have the specified position.
Parameters
position
Literal
[‘fixed-top’, ‘fixed-bottom’, ‘static-top’, ‘sticky-top’]
The expected position. Defaults to 'static-top'
.
'static-top'
timeout
Timeout
The maximum time to wait for the expectation to pass. Defaults to None
.
None
expect_title
playwright.controller.PageNavbar.expect_title(value, * , timeout= None )
Expects the navset title to have the specified 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.PageNavbar.expect_value(value, * , timeout= None )
Expects the control to have the specified value.
Parameters
value
PatternOrStr
The expected value.
required
timeout
Timeout
The maximum time to wait for the expectation to pass. Defaults to None
.
None
expect_window_title
playwright.controller.PageNavbar.expect_window_title(title, * , timeout= None )
Expects the window title to have the specified text.
Parameters
title
PatternOrStr
The expected window title.
required
timeout
Timeout
The maximum time to wait for the expectation to pass. Defaults to None
.
None
get_loc_active_content
playwright.controller.PageNavbar.get_loc_active_content(timeout= None )
Returns the locator for the active content.
Parameters
timeout
Timeout
The maximum time to wait for the locator to appear. Defaults to None
.
None
nav_panel
playwright.controller.PageNavbar.nav_panel(value)
Returns the nav panel (NavPanel
) with the specified value.
Parameters
value
str
The value of the nav panel.
required
set
playwright.controller.PageNavbar.set (value, * , timeout= None )
Sets the state of the control to open or closed.
Parameters
value
str
The selected nav item.
required