Coding Fun Java Selenium-How to fetch a text from a PDF file using Selenium+Java+TestNG

Selenium-How to fetch a text from a PDF file using Selenium+Java+TestNG

If you are trying to automate a test case where you want to fetch a text from pdf file and want to test a particular text is available on that pdf file.
Click on a pdf link
Save pdf file
open the pdf and verify the text on pdf

Tags: , , , , , , , ,

11 thoughts on “Selenium-How to fetch a text from a PDF file using Selenium+Java+TestNG”

  1. errors coming at pdf.Extracter.main(

    Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory


    at java.lang.ClassLoader.loadClass(

    at sun.misc.Launcher$AppClassLoader.loadClass(

    at java.lang.ClassLoader.loadClass(

    … 2 more

    Java Result: 1

    BUILD SUCCESSFUL (total time: 0 seconds)

  2. How to fetch text from image… Video is uploaded

  3. krithika G says:

    Good Video!! Thanks for Sharing Viren

  4. Hi Viren,
    How to fetch a text from a image file using Selenium?
    please help me..

  5. the video is very helpfull… Thankyou so much

  6. i want to do automation testing of exported pdf files. like header should be in arial -10-bold and detail section s arial -10. and report name should be in arial – 14. could plz help me on this or can create a video? thanks in advance

  7. i don't know how you do it but in my case there is no a PDFParser constructor with FileInputStream parameter;

  8. Thanks for sharing the video. One of the scenario is like this  when clicked on a link a pdf is opened in a browser without the address(URL) . How can I automate to save this pdf locally. I am currently working on Selenium Webdriver . It would be great if you can share the solution .

  9. Hi Viren Kumar. Could you please share the link of the next video that handles pdf URL.Thanks!

  10. thanks for this video. Could you please share the next video of pdf URL which you mentioned at the end..

Leave a Reply

Your email address will not be published. Required fields are marked *