← Back to team overview

sikuli-driver team mailing list archive

[Bug 975216] Re: element is not recognized in Sikuli IDE: Matching Preview, butis recognized in script

 

This is not really a bug.

-- 1. similar(1.0) should not be used
this is a known problem - use similar(0.99) instead
(but has nothing to do with your situation)

-- 2. bad screenshot
The above screenshot is not good for testing your situation, since the image (unselected button "encrypt image") is not fully visible in the upper part (left part of icon is cut off and covered by the red frame)

-- 3. tested with my own screenshot in image viewer
taking the image so it can be found (part of icon and text "encrypt image") gives a score of 1.0 in all cases (selected or unselected button). So your captured image is not useable for what you want (the image of the text dominates).

-- 4. the symbol works
using only the button part of selected version results in 
unselected: score = 0.76
selected: score = 0.97

Used test script:
img = "Encrypt1essa.png" # selected
img1= "EncryptMessa.png" # unselected
img2 = "sym.png" # selected symbol only
ap = App("Preview")
ap.focus()
r = ap.window()
r.highlight(2)
m = r.findAll(img2) # run with img, img1 and img2
for e in m:
    e.highlight(1)
    print e

** Changed in: sikuli
       Status: New => Opinion

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

Title:
  element is not recognized in Sikuli IDE: Matching Preview, butis
  recognized in script

Status in Sikuli:
  Opinion

Bug description:
  1.X 1.0 rc3
  2. Windows 7 x32
  3. Open IDE and verify that image is not recognized with Similar level 1.0
  Run the same recognition via script and results say that image is present: 
  assert not exists(Pattern("EncryptMessage.png").similar(1.0))

  Assertion throws an exception, this means that image is present but
  should not be.

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


References