Best Python code snippet using SeleniumBase
test_download_files.py
Source:test_download_files.py
...13 # Click the links to download the files into: "./downloaded_files/"14 # (If using Safari, IE, or Chromium Guest Mode: download directly.)15 # (The default Downloads Folder can't be changed when using those.)16 # (The same problem occurs when using an out-of-date chromedriver.)17 # (Use self.get_browser_downloads_folder() to get the folder used.)18 whl_selector = 'div#files a[href$="%s"]' % whl_file19 tar_selector = 'div#files a[href$="%s"]' % tar_gz_file20 if (21 self.browser == "safari"22 or self.browser == "ie"23 or (self.is_chromium() and self.guest_mode and not self.headless)24 or (25 self.browser == "chrome"26 and self.is_chromedriver_too_old()27 and self.headless28 )29 ):30 whl_href = self.get_attribute(whl_selector, "href")31 tar_href = self.get_attribute(tar_selector, "href")
...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!