Imagine my joy on seeing Mosh describe in the Selenium module the coding for EXACTLY something I want to automate in the real world. I want to open a web page and push a button. Simple?
The code I have is:
from selenium import webdriver
import time
browser = webdriver.Chrome()
browser.get(“Compass Scoring”)
time.sleep(5)
buttonlink = browser.find_element_by_link_text(“Export to Excel”)
buttonlink.click()
browser.quit
I put the time delay in to allow the page to load. Not sure if that helps or not. I do intend to learn more about html but it would be really good if I could get this to work now. I have tried various versions of the browser_find_element… methods but have no joy getting this to work and I feel like I am in the dark and just guessing. Can anyone help me with this one?
Thanks Peter