PDF Chart Testing

Is it possible to check the charts inside a PDF file using the PDF addon? If so, I would like to know how to do it. For eg, I would like to check the values inside a chart?

Hi @Kakarot ,
You can read the entire PDF into a parameter, assuming you know the structure of the chart you can parse that data however you like, and validate the string with any addon you like.
What kind of data are you trying to check?

I would like to check some values inside the chart. Note that the screenshot is taken from a PDF file.

Hi @Kakarot,
We have an addon for PDF operations,
Are you able to download a local copy of this PDF file? if so you will be able to read data from it using the PDF operations addon which can be found here:

I can download the files locally, also I’m aware of the PDF addon. The problem is the filename of the PDF changes since the timestamp is also used for the name of the PDF file. Is there any option to use regex or wildcards while inputting the file path? For eg, /home/user/pdffiles/pdf1.*.pdf

@Kakarot You can use the “get path of latest downloaded file” action:

@Amit.Lacher This is for a single file. What if i had more than 100 nos of PDFs to test?

@Amit.Lacher Also I am not seeing the full path. The latest file name is missing. i.e instead of showing “/home/user/pdf/pdf-data10.pdf” it shows “/home/user/pdf/”

Inside the directory “/home/user/pdf/” I have more than 50+ PDFs and I want to check it all with the testproject pdf plugin. Also my PDF name keeps on changing since timestamp is used for file name therefore I can’t hardcode the path, but still I want to check all the PDFs inside my directory. Is it possible to overcome all these issues?

Hi @Kakarot,
First of all, if you will need to test multiple files in the same test, you would need to loop through the files. you can do that by using a sub test. You can call it multiple times after every downloaded file.

First to find the path of the file downloaded I used this action on Windows and macOS and it works as expected. Therefor you do not need a hardcoded value for the the read PDF action.
Are you using a different system?

I’m using linux(ubuntu desktop 20.04)

As you can see it’s working on ubuntu as well.
Are you sure you are using the correct addon?

@Amit.Lacher Thanks for the help

No problem! :slight_smile:
Feel free to reach out anytime