Sep-19-2018, 07:09 PM
Hello again!
So, i am able to run selenium again, now that i have recovered from the "fatal error"
The page i am visiting has multiple links with the link text as 'View'. Behind each of these is a pdf file, which i am now able to download on clicking (since i downloaded chromedriver after facing this problem).
I understand that any activity on the page may make the references generated before it stale. For that, i have written the following:
Can someone please tell me where i am going wrong and what i can do to make this work?
Thank you!
So, i am able to run selenium again, now that i have recovered from the "fatal error"
The page i am visiting has multiple links with the link text as 'View'. Behind each of these is a pdf file, which i am now able to download on clicking (since i downloaded chromedriver after facing this problem).
I understand that any activity on the page may make the references generated before it stale. For that, i have written the following:
viewsList = reversed(browser.find_elements_by_link_text('View')) for link in viewsList: window_before = browser.window_handles[0] link.click() time.sleep(2) browser.switch_to_window(window_before) viewsList = reversed(browser.find_elements_by_link_text('View'))What i need the program to do is to sequentially download each pdf file.
Can someone please tell me where i am going wrong and what i can do to make this work?
Thank you!