2

I'm trying to automate a task in which a PDF file is generated on clicking a link. My browser settings are such that the file gets opened in a new tab of browser. The browser settings can't be changed as it'll impact other jobs on a daily run.

Is there a way through which we can read the contents of the PDF file opened in the browser in SeleniumWebdriver using Python?

I'm mainly using Chrome or Firefox to automate the task.

  • Does this answer your question? [How to download a pdf file in chrome using selenium webdriver](https://stackoverflow.com/questions/31672897/how-to-download-a-pdf-file-in-chrome-using-selenium-webdriver) – metatoaster Jun 11 '20 at 06:24
  • Also [Selenium Webdriver: How to Download a PDF File with Python?](https://stackoverflow.com/questions/43149534/selenium-webdriver-how-to-download-a-pdf-file-with-python) – metatoaster Jun 11 '20 at 06:26
  • @metatoaster My question is about reading the PDF file which is different one from the your suggested ones. –  Jun 11 '20 at 06:40
  • Or you could search online and you might have [come across this tutorial](https://www.seleniumeasy.com/selenium-tutorials/how-to-extract-pdf-text-and-verify-using-selenium-webdriver-java), though you will need to figure out the Python equivalent API calls. – metatoaster Jun 11 '20 at 06:44
  • 1
    Thanks for that. I have gone through such methods but I'm unable to find out python equivalent libraries for PDF operations. I guess someone might help me out with that. –  Jun 11 '20 at 06:53

0 Answers0