Skip to content

Instantly share code, notes, and snippets.

@rahulmr
Forked from SarahElson/locators.py
Created September 28, 2022 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulmr/f445a960d8bba464aee27f9c98ed4dba to your computer and use it in GitHub Desktop.
Save rahulmr/f445a960d8bba464aee27f9c98ed4dba to your computer and use it in GitHub Desktop.
How To Download File Using Selenium Python?
from selenium.webdriver.common.by import By
class SeleniumPlaygroundPageLocators(object):
#locators
file_download = (By.XPATH, '//li[.="File Download"]')
data_field = (By.XPATH, '//*[@id="textbox"]')
generate_file = (By.ID, 'create')
download_button = (By.XPATH, '//*[@id="link-to-download"]')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment