Sikuli4Net: is returning false when searching image on the screen

Asked by rich

I was able to compare png images to the screen till a couple of weeks back but suddenly the same piece of code is returning false, what could have gone wrong? I am using Sikuli4net. I have this code -
           APILauncher launcher = new APILauncher(true);
            launcher.Start();
            var webDriver = new ChromeDriver();

            webDriver.Navigate().GoToUrl("https://www.google.com/?gws_rd=ssl");
            Pattern pattern = new Pattern("google.png");

            Screen screen = new Screen();
            var t = screen.Exists(pattern);
           launcher.Stop();

Question information

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

If Sikuli does not find images anymore, this usually means, that the base image (where the given image is searched in - the screen in your case) has changed in a way, that the image cannot be found anymore with a similarity score > 0.7.

So you have to manually check wether your image can be found on your current screen.
Using the SikuliX IDE of the current version 1.1.0 might help to create and check your images.

http://sikulix.com

Revision history for this message
rich (richav) said :
#2

Thanks. SikuliX IDE was useful.