Skip to content
masterclass Buddy

Playwright · Class

FileChooser

FileChooser lets you control a file input after a page action opens its file picker. Wait for the chooser during that action, then use set_files to upload or clear files.

Last updated

Since
v1.9

Syntax

file_chooser.set_files(files, **kwargs)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Page.expect_file_chooser
  • Page.on("filechooser")
  • ElementHandle

Source: FileChooser | Playwright Python. Checked 2026-11-03.