Skip to content

Allow the "choose_file()" method to work on hidden "input" fields

Compare
Choose a tag to compare
@mdmintz mdmintz released this 03 Mar 21:05
· 4462 commits to master since this release
4ffd87f

Allow the choose_file() method to work on hidden "input" fields

  • (The choose_file() method lets you upload a file to a website using a file-picker.)

Example usage:

self.choose_file(selector, file_path)

self.choose_file('input[type="file"]', "my_dir/my_file.txt")

See https://github.com/seleniumbase/SeleniumBase/blob/master/examples/upload_file_test.py for an example test that uses this method.