← Back to team overview

sikuli-driver team mailing list archive

[Bug 1306954] [NEW] if exists IMG click IMG gives FindFailed error

 

Public bug reported:

Hello,

I want to start by thanking those who help with my issue.  I am very
n00b to sikuli and love the potential of this IDE.  I have a snippy go
code which runs at one point to accomplish the following:

1) see if an image exists within a region
2) if it exists to click on the image 
3) wait .3 seconds

here is my code:

if legregion.exists(Pattern("1397090049278.png").similar(0.47)):
        legregion.click(Pattern("1397090049278.png").similar(0.47))
        wait (.3)

Now the odd thing is it runs fine and produces no problems in situations
when the image is present on the screen and when the image is not
present on the screen in the first several loops of the entire script.
But once it gets to ~10 loops, it produces the following error:

[error] script [ test ] stopped with error in line 117
[error] FindFailed ( can not find P(1397096048453.png) S: 0.91 on the screen. )

There are several parts of this problem that is puzzling, first why this
can run several times (in situations where the image it's looking for is
present and not present) for several loops and why does it product a
FindFailed error when I am using "exists" instead of "find"?

Thank you for your help.  In attempt to try to google a solution, I did
find the following link, but could not decipher a solution from it:
http://testautomationnoob.blogspot.com/2013/04/sikuli-script-
troubleshooting-problems.html.  Maybe it will help others.

** Affects: sikuli
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1306954

Title:
  if exists IMG click IMG gives FindFailed error

Status in Sikuli:
  New

Bug description:
  Hello,

  I want to start by thanking those who help with my issue.  I am very
  n00b to sikuli and love the potential of this IDE.  I have a snippy go
  code which runs at one point to accomplish the following:

  1) see if an image exists within a region
  2) if it exists to click on the image 
  3) wait .3 seconds

  here is my code:

  if legregion.exists(Pattern("1397090049278.png").similar(0.47)):
          legregion.click(Pattern("1397090049278.png").similar(0.47))
          wait (.3)

  Now the odd thing is it runs fine and produces no problems in
  situations when the image is present on the screen and when the image
  is not present on the screen in the first several loops of the entire
  script.  But once it gets to ~10 loops, it produces the following
  error:

  [error] script [ test ] stopped with error in line 117
  [error] FindFailed ( can not find P(1397096048453.png) S: 0.91 on the screen. )

  There are several parts of this problem that is puzzling, first why
  this can run several times (in situations where the image it's looking
  for is present and not present) for several loops and why does it
  product a FindFailed error when I am using "exists" instead of "find"?

  Thank you for your help.  In attempt to try to google a solution, I
  did find the following link, but could not decipher a solution from
  it: http://testautomationnoob.blogspot.com/2013/04/sikuli-script-
  troubleshooting-problems.html.  Maybe it will help others.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1306954/+subscriptions


Follow ups

References