sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #13665
Re: [Question #211007]: WARNING: java.io.EOFException
Question #211007 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/211007
Status: Needs information => Open
Jai Bharti gave more information on the question:
32 bit window xp 2002.
Sikuli X r930 (Portable version for 32bit Windows. For 64bit Windows, please run the Sikuli-IDE-w.bat instead of Sikuli-IDE.exe. )
SIKULI_H
_include("../sahisource/business/Report.sah");
_include("../sahisource/business/GandivaCommon.sah");
_include("../sahisource/business/IformInstance.sah");
compatePDFUsingSikuli({"cardId":"CUCD1", "pageNo":2});
function compatePDFUsingSikuli($inputObject)
{
try
{
_log("compatePDFUsingSikuli Started");
var $dirPathSikuli;
$dirPathSikuli = _getGlobal("importDIR");
var $fitToPageIcon = $dirPathSikuli+"sikuli/image/fitToPage.png";
var $nextArrowIcon = $dirPathSikuli+"sikuli/image/nextArrow.png";
var $downloadedPdf = $dirPathSikuli+"sikuli/pdf/"+$inputObject.cardId+".pdf";
var $closePDF = $dirPathSikuli+"sikuli/image/closePDF.png";
var $pages = $inputObject.pageNo;
$obj = java.lang.Runtime.getRuntime();
$obj.gc();
$cmdline = "C:/Program Files/Adobe/Reader 9.0/Reader/AcroRd32.exe " + $downloadedPdf;
var $appObj = org.sikuli.script.App.open($cmdline); //Failing At this line
$appObj = org.sikuli.script.App.focus($cmdline);
var $screenObj= new org.sikuli.script.Screen();
$screenObj.wait($fitToPageIcon, 5000);
$clickIcon = $screenObj.find($fitToPageIcon);
$clickIcon.click($fitToPageIcon);
for(var $i=1;$i<=$pages;$i++)
{
var $baseImage = $dirPathSikuli+"sikuli/image/"+$inputObject.cardId+"_base"+$i+".png";
var $matchObj = $screenObj.find($baseImage);
var $screenScore = parseFloat($matchObj.getScore());
_assertEqual(true, ($screenScore > 0.987), "Image Match with SIKULI");
var $nextIcon = $screenObj.find($nextArrowIcon);
$nextIcon.click($nextArrowIcon);
}
$closeIcon = $screenObj.find($closePDF);
$closeIcon.click($closePDF);
$obj.gc();
_log("compatePDFUsingSikuli End");
}
catch(e)
{
handleFailure(e);
}
}
.............................................................................................
Set Under User Variable:
SAHI_HOME => D:\sahiPro
SIKULI_HOME => D:\Sikuli-IDE\
PATH => D:\Sikuli-IDE\libs;
Set JAVA_HOME
Set PATH= C:\Program Files \Java\jre6\bin
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.