Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to click button and download a file using robot frame work or selenium, it not contains link

driver.get("https://www.nasdaq.com/market-activity/stocks/screener")
try:
    # Trying to click on 'Accept Cookies' if the footer banner appears
    WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//*[@id='onetrust-accept-btn-handler']"))).click()
except: # else print the msg to console
    print("No Cookie bar")
time.sleep(2)  # a brief pause between two actions
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//button[@class='nasdaq-screener__form-button--download ns-download-1' and contains(text(), 'Download CSV')]"))).click()
time.sleep(10)  # wait for 10 seconds while the file is downloading
driver.close()
Comment

PREVIOUS NEXT
Code Example
Python :: Hide div element using python in Flask 
Python :: plot bar 
Python :: Pull data from one couchdb doc via ids in another (Python) 
Python :: pandas drop zeros from series 
Python :: dict python inpmenttion 
Python :: Filling a missing value in a pandas data frame with an if statement based on a condition 
Python :: extracting code blocks from Markdown 
Python :: EDA dataframe missing and zero values 
Python :: flask login attemted_user cant see check_password_correction method 
Python :: how to scrape data from github api python 
Python :: ring Insert Items in list 
Python :: tkinter disabled but selectable 
Python :: ring Load Syntax Files 
Python :: gfxdraw circle weight 
Python :: convert all date columns using pd.datetime 
Python :: bot that only responds to certain roles discord.py 
Python :: dic to dic arrays must all be same length 
Python :: consider a string note: "welcome" statment will rais error 
Python :: dataframe from function 
Python :: python if not explaned 
Python :: python making player inventory 
Python :: django amzon like app 
Python :: python colorama 
Python :: pandas data frame from part of excel easy 
Python :: how travel a list invertida in python 
Python :: TypeError: get() takes 1 positional argument but 2 were given 
Python :: branchless if python 
Python :: Run multiple functions at the same time 
Python :: python requests-session for websites wihout login 
Python :: how to sort a list of lists in reverse order using the first parameter in python 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =