I'm trying to download pdf with clicking on Download button using selenium and python. But getting this above mentioned error while running Chrome and my full test developed for chrome browser.
driver.find_element_by_xpath("/html/body/app-root/app-full-layout/div/div[2]/div/div/div/app-list/section/div[2]/div/div[2]/div[2]/div/div[2]/button").click()
time.sleep(7)
options = Options()
options.set_preference("browser.download.folderList", 0)
options.set_preference("browser.download.manager.showWhenStarting", False)
options.set_preference("browser.download.dir", "/DFS")
options.set_preference("browser.helperApps.neverAsk.saveToDisk","application/octet-stream,application/pdf")
driver = driver.Chrome(chrome_options=self.options)
Expected execute this code and download the pdf file