playwright.controller.InputFile
playwright.controller.InputFile(self, page, id)
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
playwright.controller.InputFile.expect_accept(value, *, timeout=None)
Expect the accept
attribute to have a specific value.
Parameters
value:
list
[str] |AttrValue
-
The expected value of the
accept
attribute. timeout:
Timeout
= None-
The timeout for the expectation. Defaults to
None
.
expect_capture
playwright.controller.InputFile.expect_capture(value, *, timeout=None)
Expect the capture
attribute to have a specific value.
Parameters
value: Literal[‘environment’, ‘user’] | None
-
The expected value of the
capture
attribute. timeout:
Timeout
= None-
The timeout for the expectation. Defaults to
None
.
expect_complete
playwright.controller.InputFile.expect_complete(timeout=None)
Expect the file upload to be complete.
Parameters
timeout:
Timeout
= None-
The timeout for the expectation. Defaults to
None
.
expect_label
playwright.controller.InputFile.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.InputFile.expect_multiple(value, *, timeout=None)
Expect the multiple
attribute to have a specific value.
Parameters
value: bool
-
The expected value of the
multiple
attribute. timeout:
Timeout
= None-
The timeout for the expectation. Defaults to
None
.
expect_width
playwright.controller.InputFile.expect_width(value, *, timeout=None)
Expect the width of the input file to have a specific value.
Parameters
value:
StyleValue
-
The expected value of the width.
timeout:
Timeout
= None-
The timeout for the expectation. Defaults to
None
.
set
playwright.controller.InputFile.set(file_path, *, timeout=None, expect_complete_timeout=30 * 1000)
Set the file upload.
Parameters
file_path: str | pathlib.Path |
FilePayload
|list
[str | pathlib.Path] |list
[FilePayload
]-
The path to the file to upload.
timeout:
Timeout
= None-
The timeout for the action. Defaults to
None
. expect_complete_timeout:
Timeout
= 30 * 1000-
The timeout for the expectation that the upload is complete. Defaults to
30 * 1000
.