[Webtest] Is there any way to verify popup PDFs

Stefan Armbruster webtest@lists.canoo.com
Wed, 25 Feb 2004 22:58:33 +0100


Hi, 

there's a open source java pdf parser: http://www.pdfbox.org. Maybe this
one can be used to parse and verify a pdf document. 

Regards,
Stefan

Am Mit, den 25.02.2004 schrieb Marc Guillemot um 22:23:
> As far as I know, webtest doesn't contain currently anything allowing to do 
> something like this.
> Testing the title of the pdf would require to be able to "understand" it. 
> Perhaps would it be easier to write a step that computes the MD5 checksum of the 
> received file and compares it with the MD5 checksum of the expected file. This 
> would be more general and should work with other kind of files.
> 
> Marc.
> 
> lisa.crispin@att.net wrote:
> > If I click on the "Program Agreement" PDF, I want to make sure I got that particular PDF, and not a different one, such as the "Services Agreement". Also, sometimes we have a problem where it brings up a PDF file that is all blank (it has the right number of pages, but there's nothing on them).  So I'd like to be able to know that at least the right title is in there.
> > 
> > I can always go in to the results directory and actually look at the files, but that's not too automated! 
> > 
> > I have a similar issue with text and csv files.  In our system, we have links to allow the user to generate a .txt or .csv file, which pops up in a window.
> > 
> > Being new to Canoo, I don't know all of its limitations yet.
> > thanks,
> > Lisa
> > 
> >>Hi Lisa,
> >>
> >>what is your criterium to determine "whether [I] got the correct PDF"?
> >>
> >>Marc.
> >>
> >>lisa.crispin@att.net wrote:
> >>
> >>>I noticed the 'previousresponse' element.  I'm able to clicklink on the PDF 
> >>
> >>file link, and use previousreponse to go back to the actual page and I can click 
> >>more PDF links or click to move off the page.  If the PDF doesn't come up, I do 
> >>get an error, so this is a useful test. And, I can look at the result files to 
> >>verify that I got the correct PDFs. But I still can't test within my WebTest 
> >>test whether I got the correct PDF.  If there is any way to do this, I would 
> >>love to know!
> >>
> >>>Thanks,
> >>>Lisa
> >>>
> >>>
> >>>>Hi Lisa,
> >>>>
> >>>>what about just using a <verifylinks/> ? Or do you need a more precise check, 
> >>>>like content-type, or something else, on the pdf files?
> >>>>
> >>>>Marc.
> >>>>
> >>>>lisa.crispin@att.net wrote:
> >>>>
> >>>>
> >>>>>Hi Marc,
> >>>>>I'm not sure if this is what you need, but this is the code around the 
> >>>>
> >>>>relevant links in the html source.  Thank you!
> >>>>
> >>>>
> >>>>>-- Lisa
> >>>>>
> >>>>><span class="tblLabelText3">Plan Documents (Print, Sign and 
> >>>>
> >>>>Return)</span></th>
> >>>>
> >>>>></tr>
> >>>>><tr class="tblCellBox3" align="left" colSpan="2"><td colspan="2"><hr 
> >>>>
> >>>>class="tblSeparator"></td></tr>
> >>>>
> >>>>><tr class="tblCellBox3">
> >>>>><td valign="top" class="tblCellBox3" align="left" width="50%">
> >>>>><ul>
> >>>>><li class="body"><a class="bodyLink" target="_blank" 
> >>>>
> >>>>href="/pdfsend?type=4103&ts=90792">Program Agreement</a></li>
> >>>>
> >>>>><li class="body"><a class="bodyLink" target="_blank" 
> >>>>
> >>>>href="/pdfsend?type=4105&ts=90792">Services Agreement</a></li>
> >>>>
> >>>>><li class="body"><a class="bodyLink" target="_blank" 
> >>>>
> >>>>href="/pdfsend?type=4102&ts=90792">Plan Adoption Agreement</a></li>
> >>>>
> >>>>><li class="body"><a class="bodyLink" target="_blank" 
> >>>>
> >>>>href="/pdfsend?type=4113&ts=90792">Group Trust Adoption Agreement</a></li>
> >>>>
> >>>>></ul>
> >>>>></td>
> >>>>></tr>
> >>>>><tr class="tblCellBox3" align="left" colSpan="2"><td colspan="2"><hr 
> >>>>
> >>>>class="tblSeparator"></td></tr>
> >>>>
> >>>>><tr class="tblHeadBox3">
> >>>>><th colSpan="2"  class="tblCellBox3" align="left">
> >>>>>
> >>>>>>Can you give an extract of the html + javascript code?
> >>>>>>
> >>>>>>Marc.
> >>>>>>
> >>>>>>lisa.crispin@att.net wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>I saw a posting on this ("Newbie needs help") from January but no final 
> >>>>>>
> >>>>>>answer.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>The application I'm testing has a lot of links to let the user view PDF 
> >>>>
> >>>>files.  
> >>>>
> >>>>
> >>>>>>I can bring up the PDF files by clicking the link in a WebTest file, but I 
> >>>>
> >>>>don't 
> >>>>
> >>>>
> >>>>>>know how to verify that the PDF file actually popped up?  Is there any way?  
> >>>>>>This is an area where we have a lot of errors, so I would like to test this 
> >>
> >>in 
> >>
> >>>>>>my regression tests.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>Thank you,
> >>>>>>>Lisa
> >>>>>>>_______________________________________________
> >>>>>>>WebTest mailing list
> >>>>>>>WebTest@lists.canoo.com
> >>>>>>>http://lists.canoo.com/mailman/listinfo/webtest
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>_______________________________________________
> >>>>>>WebTest mailing list
> >>>>>>WebTest@lists.canoo.com
> >>>>>>http://lists.canoo.com/mailman/listinfo/webtest
> >>>>>
> >>>>>_______________________________________________
> >>>>>WebTest mailing list
> >>>>>WebTest@lists.canoo.com
> >>>>>http://lists.canoo.com/mailman/listinfo/webtest
> >>>>>
> >>>>
> >>>>
> >>>>_______________________________________________
> >>>>WebTest mailing list
> >>>>WebTest@lists.canoo.com
> >>>>http://lists.canoo.com/mailman/listinfo/webtest
> >>>
> >>>_______________________________________________
> >>>WebTest mailing list
> >>>WebTest@lists.canoo.com
> >>>http://lists.canoo.com/mailman/listinfo/webtest
> >>>
> >>
> >>
> >>_______________________________________________
> >>WebTest mailing list
> >>WebTest@lists.canoo.com
> >>http://lists.canoo.com/mailman/listinfo/webtest
> > 
> > _______________________________________________
> > WebTest mailing list
> > WebTest@lists.canoo.com
> > http://lists.canoo.com/mailman/listinfo/webtest
> > 
> 
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest