I'm trying to get selenium to press on the save button of the print pop up to save a pdf file. I can get selenium to press on the "print" button but once the pop up appears with the adress chrome://print/ nothing happens. Is there another way to do it?
This is the part's code so far:
#download pdf
download_button = wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="printpagetoolbar"]/tbody/tr/td[3]/table/tbody/tr/td/a')))
download_button.click()
# download file: Nothing happens, this doesn't work
download = wait.until(EC.element_to_be_clickable(By.XPATH, '//*[@id="sidebar"]//print-preview-button-strip//div/cr-button[1]'))
download.click()