playwright.controller.InputSelectize
playwright.controller.InputSelectize(page, id)Controller for shiny.express.ui.input_selectize.
Attributes
| Name | Description |
|---|---|
| expect | Expectation method equivalent to playwright.expect(self.loc). |
| id | The browser DOM id 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 selectize to be an exact match. |
| expect_choices | Expect the available options of the input selectize 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_width | Expect the input element to have a specific width. |
| set | Sets the selected option(s) of the input selectize. |
expect_choice_groups
playwright.controller.InputSelectize.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.InputSelectize.expect_choice_labels(
value,
*,
timeout=None,
)Expect the choice labels of the input selectize 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.InputSelectize.expect_choices(choices, *, timeout=None)Expect the available options of the input selectize 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.InputSelectize.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.InputSelectize.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.InputSelectize.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 | 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_width
playwright.controller.InputSelectize.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.InputSelectize.set(selected, *, timeout=None)Sets the selected option(s) of the input selectize.
Selected items are altered as follows: 1. Click on the selectize input to open the dropdown. 2. Starting from the first selected item, each position in the currently selected list should match selected. If the item is not a match, remove it and try again. 3. Add any remaining items in selected that are not currently selected by clicking on them in the dropdown. 4. Press the "Escape" key to close the dropdown.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| selected | str | list[str] |
The [ordered] 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 |