<input type="file">
).
The element is identified using one of the provided selector strategies.
Can be used to simulate file uploads.
Example: setInputFiles(selector: "input[type='file']", files: [{ name: "file.txt", mimeType: "text/plain", data: "SGVsbG8gd29ybGQ=" }])
The data
field should be Base64 encoded content of the file.
Returns true if the files were successfully set.
selector
"#username"
for <input id="username" />
.
text
"Login"
for <button>Login</button>
.
role
"button"
for <div role="button">Submit</div>
.
label
"Search button"
for <button aria-label="Search button"><svg/></button>
.
placeholder
"Enter your email"
for <input placeholder="Enter your email" />
.
altText
"Company logo"
for <img alt="Company logo" src="..." />
.
title
"Close dialog"
for <span title="Close dialog">X</span>
.
testId
"submit-button"
for <button data-testid="submit-button">Go</button>
.
filter
files
Boolean
scalar type represents true
or false
.