Last active
August 12, 2022 14:37
-
-
Save SarahElson/552e4b3139282ac98f23c72531a58fee to your computer and use it in GitHub Desktop.
How To Download File Using Selenium Python?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from selenium import webdriver | |
class Browser(unittest.TestCase): | |
def setUp(self): | |
PATH = "/Users/macbookair/Desktop/how_download_files_selenium_python/download" #This path must be modified according to your OS and the directory where you want to save your file | |
self.driver.get("https://www.lambdatest.com/selenium-playground/") | |
def tearDown(self): | |
self.driver.close() | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment