[1.0.1] .observe quits before it should be finished --- fixed in 1.1.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
Fix Committed
|
Critical
|
RaiMan |
Bug Description
--- fixed in 1.1.0
observe is completely revised and improved in 1.1.0
-------
--- should be tested with 1.0.1: since observe is revised and has more debug messages.
I'm trying to create a script that tests an installer. For some reason it quits about half way through even though I can't see any reason for it to. It runs up until after it sees and runs the "install_path_page" handler. Once it runs that handler, it quits with "[info] Exit code: 0"
This is running on Windows Server 2012 Standard using 64-bit Java 1.7.0_25 and 64-bit Sikuli IDE 1.0.0 with the "SupplementalOb
After posting this as a question, RaiMan mentioned that it will stop if it has handled all the .onAppear images. I tried adding a new .onAppear image that would never show up. The script still behaves exactly the same.
Here is what I have so far. I plan on having observe run forever eventually and have the last handler stop the observation:
installer_path = 'C:\\Users\
license_company = 'company'
license_name = 'name'
license_count = 1
license_key = 'xxxxxxxxxxxxxx
postgres_password = 'xxxxxxx'
def click_next():
click(
def intro_page(event):
click_next()
def eula_page(event):
click(
click_next()
def license_
type(
type(
type(
type(
click_next()
def install_
click_next()
def features_
click_next()
def postgresql_
click_next()
def postgresql_
type(
type(
click_next()
def web_ports_
click_next()
def ready_to_
click_next()
def begin_watching():
es_installer = App(installer_path)
es_
wait(
reg = Region(
reg.
reg.
reg.
reg.
reg.
reg.
reg.
reg.
reg.
reg.
begin_watching()
Changed in sikuli: | |
status: | New → Fix Committed |
importance: | Undecided → High |
assignee: | nobody → RaiMan (raimund-hocke) |
milestone: | none → 1.1.0 |
Changed in sikuli: | |
status: | Fix Committed → In Progress |
description: | updated |
tags: | added: fkt-observe |
summary: |
- .observe quits before it should be finished + [1.0.1] .observe quits before it should be finished |
Changed in sikuli: | |
status: | In Progress → Fix Committed |
summary: |
- [1.0.1] .observe quits before it should be finished + [1.0.1] .observe quits before it should be finished --- fixed in 1.1.0 |
description: | updated |
Changed in sikuli: | |
importance: | High → Critical |
Thanks for testing and evaluating.
At least the observe has some quirks ;-)
Today I went through the observe implementation and added some features and a better (LOL) debug log.
It will be available with the service update 1.0.1 end July.
- in the handler function you can decide to repeat the onAppear when coming back from the handler AutoWaitTimeout )
e.repeat(time)
a time value in seconds waits for the target to vanish again before searching again (default region.
this repeated onAppear is of value when you run the observe in the background.
(not restricting to the first appear in the RC3 version may lead to fancy loops ;-)
- e.getCount() gives you a number how many times, the handler was visited
- you can say e.stopObserver() instead of e.region. stopObserver( )
--- different image sets
This is best done with some images.sikuli, that is imported and has images stored in variables with some naming conventions or other structures, that allow to select a set depending on the current runtime situation.