playwright.controller.InputSelect

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

Controller for shiny.express.ui.input_select.

If you have defined your app's select input (ui.input_select()) with selectize=TRUE, use InputSelectize to test your app's UI.

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.
loc_label Playwright Locator for the label of the UI element.
page Playwright Page of the Shiny app.

Methods

Name Description
expect_choice_groups Expect the choice groups of the input select to be an exact match.
expect_choice_labels Expect the choice labels of the input select to be an exact match.
expect_choices Expect the available options of the input select to be an exact match.
expect_label Expect the label of the input to have a specific text.
expect_multiple Expect the input selectize to allow multiple selections.
expect_selected Expect the selected option(s) of the input select to be an exact match.
expect_size Expect the size attribute of the input select to have a specific value.
expect_width Expect the input element to have a specific width.
set Sets the selected option(s) of the input select.

expect_choice_groups

playwright.controller.InputSelect.expect_choice_groups(
    choice_groups,
    *,
    timeout=None,
)

Expect the choice groups of the input select to be an exact match.

Parameters

Name Type Description Default
choice_groups ListPatternOrStr The expected choice groups of the input select. required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_choice_labels

playwright.controller.InputSelect.expect_choice_labels(value, *, timeout=None)

Expect the choice labels of the input select to be an exact match.

Parameters

Name Type Description Default
value ListPatternOrStr The expected choice labels of the input select. required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_choices

playwright.controller.InputSelect.expect_choices(choices, *, timeout=None)

Expect the available options of the input select to be an exact match.

Parameters

Name Type Description Default
choices ListPatternOrStr The expected choices of the input select. required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_label

playwright.controller.InputSelect.expect_label(value, *, timeout=None)

Expect the label of the input to have a specific text.

Parameters

Name Type Description Default
value PatternOrStr The expected text value of the label. required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_multiple

playwright.controller.InputSelect.expect_multiple(value, *, timeout=None)

Expect the input selectize to allow multiple selections.

Parameters

Name Type Description Default
value bool Whether the input select allows multiple selections. required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_selected

playwright.controller.InputSelect.expect_selected(value, *, timeout=None)

Expect the selected option(s) of the input select to be an exact match.

Parameters

Name Type Description Default
value PatternOrStr | ListPatternOrStr The expected value(s) of the selected option(s). required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_size

playwright.controller.InputSelect.expect_size(value, *, timeout=None)

Expect the size attribute of the input select to have a specific value.

Parameters

Name Type Description Default
value AttrValue The expected value of the size attribute. required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

expect_width

playwright.controller.InputSelect.expect_width(value, *, timeout=None)

Expect the input element to have a specific width.

Parameters

Name Type Description Default
value AttrValue The expected width. required
timeout Timeout The maximum time to wait for the expectation to be fulfilled. Defaults to None. None

set

playwright.controller.InputSelect.set(selected, *, timeout=None)

Sets the selected option(s) of the input select.

Parameters

Name Type Description Default
selected str | ListOrTuple[str] The value(s) of the selected option(s). required
timeout Timeout The maximum time to wait for the selection to be set. Defaults to None. None