playwright.controller.InputFile
self, page, id) playwright.controller.InputFile(
Controller for shiny.express.ui.input_file.
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_button | Playwright Locator of the button. |
loc_container | Playwright Locator for the container of the UI element. |
loc_file_display | Playwright Locator of the file display. |
loc_label | Playwright Locator for the label of the UI element. |
loc_progress | Playwright Locator of the progress bar. |
page | Playwright Page of the Shiny app. |
Methods
Name | Description |
---|---|
expect_accept | Expect the accept attribute to have a specific value. |
expect_button_label | Expect the button label to have a specific value. |
expect_capture | Expect the capture attribute to have a specific value. |
expect_complete | Expect the file upload to be complete. |
expect_label | Expect the label of the input to have a specific text. |
expect_multiple | Expect the multiple attribute to have a specific value. |
expect_width | Expect the width of the input file to have a specific value. |
set | Set the file upload. |
expect_accept
*, timeout=None) playwright.controller.InputFile.expect_accept(value,
Expect the accept
attribute to have a specific value.
Parameters
Name | Type | Description | Default |
---|---|---|---|
value | list [str] | AttrValue |
The expected value of the accept attribute. |
required |
timeout | Timeout |
The timeout for the expectation. Defaults to None . |
None |
expect_capture
*, timeout=None) playwright.controller.InputFile.expect_capture(value,
Expect the capture
attribute to have a specific value.
Parameters
Name | Type | Description | Default |
---|---|---|---|
value | Literal[‘environment’, ‘user’] | None | The expected value of the capture attribute. |
required |
timeout | Timeout |
The timeout for the expectation. Defaults to None . |
None |
expect_complete
=None) playwright.controller.InputFile.expect_complete(timeout
Expect the file upload to be complete.
Parameters
Name | Type | Description | Default |
---|---|---|---|
timeout | Timeout |
The timeout for the expectation. Defaults to None . |
None |
expect_label
*, timeout=None) playwright.controller.InputFile.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.InputFile.expect_multiple(value,
Expect the multiple
attribute to have a specific value.
Parameters
Name | Type | Description | Default |
---|---|---|---|
value | bool | The expected value of the multiple attribute. |
required |
timeout | Timeout |
The timeout for the expectation. Defaults to None . |
None |
expect_width
*, timeout=None) playwright.controller.InputFile.expect_width(value,
Expect the width of the input file to have a specific value.
Parameters
Name | Type | Description | Default |
---|---|---|---|
value | StyleValue |
The expected value of the width. | required |
timeout | Timeout |
The maximum time to wait for the expectation to be fulfilled. Defaults to None . |
None |
set
set(
playwright.controller.InputFile.
file_path,*,
=None,
timeout=30 * 1000,
expect_complete_timeout )
Set the file upload.
Parameters
Name | Type | Description | Default |
---|---|---|---|
file_path | str | pathlib.Path | FilePayload | list [str | pathlib.Path] | list [FilePayload ] |
The path to the file to upload. | required |
timeout | Timeout |
The timeout for the action. Defaults to None . |
None |
expect_complete_timeout | Timeout |
The timeout for the expectation that the upload is complete. Defaults to 30 * 1000 . |
30 * 1000 |