I have a problem while comparing the images in Sikuli

Asked by kumar

I tried it with in the following way:

I stored my expected image in my local directory and I should compare with actual image which is displaying on my screen.
To achieve this I tried with pattern feature but it is not showing any error when i pass different image which was not related to that actual image

Code:

Finder finder = new Finder("File Path");

finder.find(File Path);

Please any one can help me on this issue.....................

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

if not exists("path-to-my-expected-image.png", 0):
    print "screen display not as expected"
else:
    print "screen display is as expected"

if it makes sense: you might restrict the region where you expect the image to be and use
expected_region.exists()

Revision history for this message
kumar (lohith-velagapudi7503) said :
#2

As per your suggestion,I tried it for my desktop application but it is not working.

Revision history for this message
Eugene S (shragovich) said :
#3

Hi,

Can you please specify what's not working exactly?

Cheers,
Eugene

Revision history for this message
kumar (lohith-velagapudi7503) said :
#4

The following error message is displayed:

 "text was disabled".

Can you help with this problem?

Provide an answer of your own, or ask kumar for more information if necessary.

To post a message you must log in.