playwright.controller.InputSelect
self, page, id) playwright.controller.InputSelect(
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,*,
=None,
timeout )
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
*, timeout=None) playwright.controller.InputSelect.expect_choice_labels(value,
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
*, timeout=None) playwright.controller.InputSelect.expect_choices(choices,
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
*, timeout=None) playwright.controller.InputSelect.expect_label(value,
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
*, timeout=None) playwright.controller.InputSelect.expect_multiple(value,
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
*, timeout=None) playwright.controller.InputSelect.expect_selected(value,
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
*, timeout=None) playwright.controller.InputSelect.expect_size(value,
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
*, timeout=None) playwright.controller.InputSelect.expect_width(value,
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
set(selected, *, timeout=None) playwright.controller.InputSelect.
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 |