I've tried some of the solutions posted at this site but I still cannot make this thing work. I have to grab a PDF from a secured website. I'm able to get all the way to the page that has the button to create the PDF but I cannot find code that will let me then download the PDF. Here's what I got so far and any help is much appreciated!
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Chrome()
driver.get("https://service.medical.barco.com/server/jsp/login")
username = driver.find_element_by_name('j_username')
password = driver.find_element_by_name('j_password')
username.send_keys("XXX")
password.send_keys("XXX")
driver.find_element_by_css_selector('[value="Log on"]').click()
##makes the PDF and shows it in the Google PDF viewer
url = "https://service.medical.barco.com/server/spring/jsp/workstation/complianceCheckDetailReport/?displayId=932610524&date=1598328417477"
driver.get(url)
driver.find_element_by_class_name('href-button').click()
##This is probably unnecessary but I thought a direct link to the created PDF could give me a variable I could then download
pdf = "https://service.medical.barco.com/server/spring/jsp/workstation/complianceCheckDetailReport/jasper/report.pdf?format=pdf&displayId=932610524&date=1598328417477"
driver.get(pdf)