[1.0.1] Jython scripting: exists() in with block generates screenshotfiles --- workaround: do not use it ;-)

Bug #1362461 reported by RaiMan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Confirmed
Medium
RaiMan

Bug Description

Hi all!

I faced the following problem. During running Sikuli script it generates useless PNG files in the test directory. Looks like it makes screenshot every time method exists() fails. I am using stable 1.0.1. There is simple script to reproduce this behavior below. IDE feature to remove useless PNG helps, but not when I run tests in batch mode using our cmake/ctest routine... Is there any setting to disable this?

app = App("gnome-calculator")
app.open()
for i in xrange(int(100500)):
  wnd = app.window()
  if wnd is not None:
    with Region(wnd) as region:
      if region.exists("1409168557236.png", 0):
        break

Best regards and thanks in advance,
Alexander.

Revision history for this message
RaiMan (raimund-hocke) wrote :

in this special case:
this works as expected:

app = App("gnome-calculator")
app.open()
for i in xrange(int(100500)):
  wnd = app.window()
  if wnd is not None:
    region = Region(wnd)
    if region.exists("1409168557236.png", 0):
      break

Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
RaiMan (raimund-hocke)
Changed in sikuli:
importance: High → Medium
milestone: 1.1.0 → 2.0.0
status: Fix Committed → In Progress
RaiMan (raimund-hocke)
Changed in sikuli:
status: In Progress → Confirmed
milestone: 2.0.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.