playwright_upload_file
Upload files to web pages by specifying the CSS selector of the input element and the file’s absolute path using browser automation with Playwright.
Instructions
Upload a file to an input[type='file'] element on the page
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"selector": "<selector>",
"filePath": "<filePath>"
},
"name": "playwright_upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the file to upload | |
| selector | Yes | CSS selector for the file input element |