Sikulix Helper Script

This user guide describes additional functions to SikuliX that are used for integration with SKOOR. The full SikuliX documentation is provided by the respective project page http://sikulix.com/.

SkoorUtils

Import

from skoor import SkoorUtils

Functions

SkoorUtils.waitStable(pattern, stableRegion, minStableSeconds=2, timeout=None)

Waits for a pattern after stableRegion has been stable for minStableSeconds.

Returns the match and the timestamp when stableRegion has started to be stable for minStableSeconds.

Example
match, t = waitStable("1550299116977.png", Region(7,0,237,1024), 2, 10)
print(t)
click(match)

SkoorTimer

Produces a SKOOR SikuliX timer file in logs/<testname>.timer.out.

Import

from skoor import SkoorTimer

Functions

Timer(name)

Creates a new named timer instance.

start()

stop()

pause()

resume()

stopAfterWaitStable(pattern, stableRegion, minStableSeconds=2, timeout=None)

Performs a waitStable and stops timer on the returned timestamp.

pauseAfterWaitStable(pattern, stableRegion, minStableSeconds=2, timeout=None)

Performs a waitStable and pauses timer on the returned timestamp.

Examples

Simple timer
timer = SkoorTimer("main")
timer.start()
# do something
timer.stop()

Create started timer
timer = SkoorTimer("main").start()
# do something
timer.stop()

stopAfterWaitStable
SkoorTimer("main").start().stopAfterWaitStable("1550299116977.png", Region(7,0,237,1024), 2, 10)

SkoorScreenshot

Unnamed screenshots are always deleted on script start.

Import

from skoor import SkoorScreenshot

Functions

SkoorScreenshot.capture(fileName=None)

Creates a screenshot of the whole screen and saves it in logs/<fileName>

If no fileName is given, it defaults to <testName>.screenshot.png.

SkoorScreenshot.captureFocusedWindow(fileName=None)

Creates a screenshot of the currently focused window and saves it in logs/<fileName>.

If no fileName is given, it defaults to <testName>.screenshot.png.