Hey, my goal is to check a PDF that opens in a new tab (any browser). I used Fontbox and PDF box to check the pdf. I created a keyword that is meant to read PDF:
public class PDFReader {
@Keyword
def ReadPDF(String PDFURL) {
URL TestURL = new URL(PDFURL);
BufferedInputStream bis = new BufferedInputStream(TestURL.openStream());
PDDocument doc = PDDocument.load(bis);
String pdfText = new PDFTextStripper().getText(doc);
doc.close();
bis.close();
println(pdfText);
}
}
. But unfortunately when I try to use a keyword to read me data from a new browser tab, the second browser window seems to be inactive so I have to substitute a ready link to the PDF to make it work. Is there any other solution to read and parse the PDF from the second window?