-
with normal selenium i can set the download directory by: How do i add the above to seleniumbase as per below: chromeProfileDirectory = f"{directory}/ChromeProfile/" + uniqueChromeProfile |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Duplicate of #1557 (comment) SeleniumBase creates the There are lots of built-in test methods that are specially made for that folder, such as: self.get_downloads_folder()
self.get_browser_downloads_folder()
self.get_path_of_downloaded_file(file)
self.is_downloaded_file_present(file)
self.delete_downloaded_file_if_present(file)
# Duplicates: self.delete_downloaded_file(file)
self.assert_downloaded_file(file)
self.get_downloaded_files(regex=None, browser=False)
self.get_data_from_downloaded_file(file, timeout=None, browser=False)
self.assert_data_in_downloaded_file(data, file, timeout=None, browser=False) If you need files in a different folder, use Python There's also a Line 673 in 570910c (A copy of those downloads will go into a folder in the |
Beta Was this translation helpful? Give feedback.
Duplicate of #1557 (comment)
SeleniumBase creates the
downloaded_files
folder in the working directory wherepytest
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 newpytest
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 newpytest
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: