playwright.controller.InputSelect

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

Controller for shiny.express.ui.input_select.

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_choice_groups Playwright Locator for the choice groups of the input select.
loc_choices Playwright Locator for the choices of the input select.
loc_container Playwright Locator for the container of the UI element.
loc_label Playwright Locator for the label of the UI element.
loc_selected Playwright Locator for the selected option of the input select.
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 select to allow multiple selections.
expect_selected Expect the selected option(s) of the input select to be an exact match.
expect_selectize Expect the input select to be selectize.
expect_size Expect the size attribute of the input select to have a specific value.
expect_width Expect the width attribute of a DOM element to have a specific value.
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

choice_groups: ListPatternOrStr

The expected choice groups of the input select.

timeout: Timeout = None

The maximum time to wait for the expectation to be fulfilled. Defaults to 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

value: ListPatternOrStr

The expected choice labels of the input select.

timeout: Timeout = None

The maximum time to wait for the expectation to be fulfilled. Defaults to 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

choices: ListPatternOrStr

The expected choices of the input select.

timeout: Timeout = None

The maximum time to wait for the expectation to be fulfilled. Defaults to None.

expect_label

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

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

Parameters

value: PatternOrStr

The expected text value of the label.

timeout: Timeout = None

The maximum time to wait for the expectation to be fulfilled. Defaults to None.

expect_multiple

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

Expect the input select to allow multiple selections.

Parameters

value: bool

Whether the input select allows multiple selections.

timeout: Timeout = None

The maximum time to wait for the expectation to be fulfilled. Defaults to 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

value: PatternOrStr | ListPatternOrStr

The expected value(s) of the selected option(s).

timeout: Timeout = None

The maximum time to wait for the expectation to be fulfilled. Defaults to None.

expect_selectize

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

Expect the input select to be selectize.

Parameters

value: bool

Whether the input select is selectize.

timeout: Timeout = None

The maximum time to wait for the expectation to be fulfilled. Defaults to 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

value: AttrValue

The expected value of the size attribute.

timeout: Timeout = None

The maximum time to wait for the expectation to be fulfilled. Defaults to None.

expect_width

playwright.controller.InputSelect.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.InputSelect.set(selected, *, timeout=None)

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

Parameters

selected: str | ListOrTuple[str]

The value(s) of the selected option(s).

timeout: Timeout = None

The maximum time to wait for the selection to be set. Defaults to None.