Forum Discussion

SuperTester's avatar
SuperTester
Contributor
6 years ago

Modifying a script to compare PDF's

Hi!

 

I have a script that uses Acrobat DC to perform a PDF comparison. I need to add two more steps in the script in order to make a effective comparison. I'm not sure how to correctly map to the locations to perform a click and insert action. Are there any examples I could use for referance? Or documentation instucting how to use Object Spy to map a location?

 

Currently, the script clicks the comparison icon, which causes Adobe to make a comparison report, and then Test Complete performs a region check point on the results page.

 

Before the checkpoint is performed, I would like to first click the "New File" icon and change the zoom to 100%. See the screen shot attached. The tricky part is that Test Complete's object spy does not see "New File" as a object.

Script is below for referance!

 

Thanks!

 

//Compare
acrobat.wndAcrobatSDIWindow.AVFlipContainerView.AVDocumentMainView.AVFlipContainerView.AVScrollView.AVTableContainerView.Click(957, 600); // Clicks compare icon to generate report

acrobat.WaitWindow('AcrobatSDIWindow', '[Compare Report]*', -1, 30000); // delay
// (Select "New File" here)

// (Change zoom to 100% here)

//Take Region Checkpoint for expected differences
var pdfCheckpoint = eval('Regions.' + Project.Variables.PDFRegionCheckpoint);
pdfCheckpoint.Check(acrobat.wndAcrobatSDIWindow.AVFlipContainerView.AVDocumentMainView.AVFlipContainerView.AVSplitterView.AVSplitationPageView.AVSplitterView.AVScrolledPageView.AVScrollView.AVPageView, false, false, 2000, 8);