1

I developed a bot (chrome) on python using selenium and it works perfectly when I run the code from spyder IDE. However, when I try to run it from terminal, everything works correctly until the last click- the window closes unexpectedly with no errors or exception on the terminal shell. Here's a summary of what I want to do:

driver.get(website)
driver.find_element_by_xpath("//*[contains(text(),'View PDF')]").click()
driver.switch_to.window(driver.window_handles[-1])

Thanks in advance!

0 Answers0