[1.1.1 final] Screen().capture() does not return path --- use Screen().capture().getFile() or capture() in scripts

Bug #1705515 reported by Samson Truong
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
Won't Fix
Undecided
RaiMan

Bug Description

**************** correct usage to get a filename in temp storage

Screen().capture().getFile()

or in a script use the undotted version as documented:
capture()

-- explanation:
The intended behaviour of the capture feature is to create an in-memory image in the first place (implemented at the Java level).
At the script level there is a convenience capture() (undotted usage, bound to the SCREEN object being), which returns the filename of the image stored in temp storage.

That in versions before 1.1.1 Screen().capture() returned a filename instead of a ScreenImage object was a bug, that never was discovered.

-------------------------------------------

In 1.1.1 Screen().capture() returns "org.sikuli.script.ScreenImage@4d1ab2e0

in 1.1.0 Screen().capture() returns "...\AppData\Local\Temp\Sikulix_1083747527\sikuliximage-1500565358268.png"

Same script, just switching between 1.1.0 and 1.1.1 IDE

Windows 10 Pro Version 1703 64-Bit

Thanks

summary: - 1.1.1 Screen().capture does not return path
+ 1.1.1 Screen().capture() does not return path
Changed in sikuli:
status: New → Invalid
Revision history for this message
RaiMan (raimund-hocke) wrote : Re: 1.1.1 Screen().capture() does not return path

Why did you change your mind?

Seems really to be a bug in 1.1.1

Revision history for this message
Rainer (formulator) wrote :

I can confirm the bug. Same environment as Samson Truong.

Isn't this the same bug as 1589474 from 2016-06-06 that was supposed to have been fixed?

Changed in sikuli:
status: Invalid → Confirmed
RaiMan (raimund-hocke)
summary: - 1.1.1 Screen().capture() does not return path
+ [1.1.1 final] Screen().capture() does not return path
Changed in sikuli:
status: Confirmed → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.2
summary: - [1.1.1 final] Screen().capture() does not return path
+ [1.1.1 final] Screen().capture() does not return path --- workaround
description: updated
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Won't Fix
importance: High → Undecided
milestone: 1.1.2 → none
description: updated
summary: - [1.1.1 final] Screen().capture() does not return path --- workaround
+ [1.1.1 final] Screen().capture() does not return path --- use
+ Screen().capture().getFile()
RaiMan (raimund-hocke)
summary: [1.1.1 final] Screen().capture() does not return path --- use
- Screen().capture().getFile()
+ Screen().capture().getFile() or capture() in scripts
description: updated
Revision history for this message
RaiMan (raimund-hocke) wrote :

@Rainer Oehry
Sorry for the inconvenience.

Please read the revised bug header above.

In your scripts you either have to use (undotted)
capture()

or
Screen().capture().getFile()

to get a filename in temp storage.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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