Skip to content

Clarification on SeleniumBase Download Handling: Custom Download Folders and Preventing Filename Conflicts #2757

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

You must be logged in to vote

Already discussed here #1557 (comment)


SeleniumBase creates the downloaded_files folder in the working directory where pytest is invoked. Any click-initiated downloads will go there. It's also used for any special files needed. It also holds lock files to prevent issues with multi-threading. The folder resets at the start of every new pytest run so that past test runs don't interfere with new ones. The folder is hard-coded there to prevent issues. And since the folder is reset at the start of new pytest runs, you wouldn't want to use any other existing folders for it.

There are lots of built-in test methods that are specially made for that folder, such as:

self.get_downloads_folder()

self.

Replies: 1 comment

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