mirror of
				https://github.com/microsoft/playwright-mcp.git
				synced 2025-10-12 00:25:14 +03:00 
			
		
		
		
	feat: browser_choose_file (#52)
Resolves https://github.com/microsoft/playwright-mcp/issues/31. Prompt used for testing: ``` upload test.txt to dropbox ``` This won't work for asynchronously opened filechoosers, but let's start with the synchronous variant. I also tested with including the file chooser open state in the snapshot, but that didn't give better results. I also tested with OneDrive and WeTransfer, but somehow our ARIA snapshots for those pages are missing some elements that are crucial to locate the upload buttons.
This commit is contained in:
		
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| @@ -203,6 +203,11 @@ The Playwright MCP provides a set of tools for browser automation. Here are all | ||||
|     - `ref` (string): Exact target element reference from the page snapshot | ||||
|     - `values` (array): Array of values to select in the dropdown. | ||||
|  | ||||
| - **browser_choose_file** | ||||
|   - Description: Choose one or multiple files to upload | ||||
|   - Parameters: | ||||
|     - `paths` (array): The absolute paths to the files to upload. Can be a single file or multiple files. | ||||
|  | ||||
| - **browser_press_key** | ||||
|   - Description: Press a key on the keyboard | ||||
|   - Parameters: | ||||
| @@ -283,6 +288,11 @@ Vision Mode provides tools for visual-based interactions using screenshots. Here | ||||
|   - Parameters: | ||||
|     - `key` (string): Name of the key to press or a character to generate, such as `ArrowLeft` or `a` | ||||
|  | ||||
| - **browser_choose_file** | ||||
|   - Description: Choose one or multiple files to upload | ||||
|   - Parameters: | ||||
|     - `paths` (array): The absolute paths to the files to upload. Can be a single file or multiple files. | ||||
|  | ||||
| - **browser_save_as_pdf** | ||||
|   - Description: Save page as PDF | ||||
|   - Parameters: None | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Simon Knott
					Simon Knott