Sep-13-2018, 06:53 AM
Hello!
I've been trying to use Selenium as i am unable to figure requests out (kindly help me with requests here).
I am facing the following problem with selenium:
When trying to download pdf files from multiple links on the same page, it opens the pdf in a different window and throws the following error:
I've been trying to use Selenium as i am unable to figure requests out (kindly help me with requests here).
I am facing the following problem with selenium:
When trying to download pdf files from multiple links on the same page, it opens the pdf in a different window and throws the following error:
Error:Message: The element reference of <a href="javascript:__doPostBack('dtgReports$ctl03$ctl01','')"> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshedI have tried the following with no success:profile = webdriver.FirefoxProfile()
profile.set_preference("browser.download.folderList", 2)
profile.set_preference("browser.download.manager.showWhenStarting", False)
profile.set_preference("browser.download.dir", '/home/bunni/Desktop/pat_files')
profile.set_preference("browser.helperApps.neverAsk.saveToDisk", "application/pdf")
profile.set_preference("browser.helperApps.neverAsk.openFile", "")
profile.set_preference("pdfjs.disables", True)
profile.set_preference("plugin.scan.Acrobat", "99.0")
profile.set_preference("plugin.scan.plid.all", False)
profile.set_preference("browser.download.manager.useWindow", True)
profile.set_preference("plugin.disable_full_page_plugin_for_types", "application/pdf")
browser = webdriver.Firefox(firefox_profile=profile)Can someone please help me out here?
