Skip to content

BaseCase and input[type="file"] #2307

Closed Answered by mdmintz
Saorhe asked this question in Q&A
Discussion options

You must be logged in to vote

Sometimes there's a hidden file input field on a webpage. (Eg. 'input[type="file"]')

SeleniumBase has a method for revealing those hidden file input fields:

self.show_file_choosers()

Here's a method for selecting a file to upload on that input field:

self.choose_file(selector, file_path)

Here's an example test that uses that:

SeleniumBase/examples/test_show_file_choosers.py

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants