18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Not able to read pdf file data

sunnysunny Members
edited April 2013 in Sahi Pro
HI,

I need to verify data on a pdf using Sahi. I tried with the code give at
http://sahi.co.in/w/reading-pdf-files
but it throws error like

_log("Download pdfbox-app-1.8.1.jar from http://pdfbox.apache.org/download.html", "CUSTOM");
_log("Copy it to sahi/userdata/extlib/pdfbox folder (create if required)", "CUSTOM");
_call(document.body.innerHTML = "Error: Unable to access jarfile C:\\Documents\r\n");
_assertContainsText("2 October 1869", _paragraph("/Born/"));
--Stopped Playback: FAILURE--

could anyone help me out on this.

Thanks,
Sarathy CR

Answers

  • sunnysunny Members
    Hi,

    I am able to run above code successfully, but i am facing a new challenge.
    I am passing a non existing text value but it shows passed.

    // This is getting passed as the pdf does not contains this text.

    _assertExists("2 October 1860");
    _assertExists("Pakala");

    I don't know whether i am doing any wrong in coding .

    Please help me.

    Thanks,
    Sarathy CR
Sign In or Register to comment.