← Back to team overview

sikuli-driver team mailing list archive

[Question #233689]: Detect a dialog box

 

New question #233689 on Sikuli:
https://answers.launchpad.net/sikuli/+question/233689

Problem: Often times I'm unable to detect images using the wait() or exists() methods. This seems like a really easy problem but I'm consistently having an issue with this.  It's different things I'm trying to detect but most often it's a Windows dialog box with text. I've tried a couple solutions (exists and wait, neither yields a greater chance of success):

Solution 1
if exists(image.jpg):
      print 'I like cookies'

Solution 2
p = Pattern("image.jpg")
p.similar(.85)
if exists(p):
      print 'I like cookies'

These solutions sometimes work but often they don't. I'm not sure why. I've tried taking extremely small images of the dialog box, even just a word from the box. There are no strange backgrounds  or colors. It's just black text on a gray background. I've also tried taking screenshots of other things (a PDF) without much success.

Thank you so much for your help.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.