How to read the pdf file using selenium
问题 I am working on web page over which there is a link, clicking on which it opens a pdf file on new window. I have to read that pdf file to validate some data against the transactions done. One way is to download that file and then use it. Can any one help me out on this. I have to work on IE 11 Thanks in Advance. 回答1: Use PDFBox and FontBox. public String readPDFInURL() throws EmptyFileException, IOException { WebDriver driver = new FirefoxDriver(); // page with example pdf document driver.get