sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #04107
Re: [Question #165763]: Writting handler code for sikuli in selenium
Question #165763 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/165763
Status: Open => Answered
RaiMan proposed the following answer:
--1. implement SikuliEventObserver
see:
http://sikuli.org/doc/java-x/org/sikuli/script/SikuliEventObserver.html
implement the applicable callbacks. You might check the event contents
(http://sikuli.org/doc/java-x/org/sikuli/script/SikuliEvent.html) and
stop observing.
--2. register an observer with a region
reg.onAppear(img, observer)
(see e.g.
http://sikuli.org/doc/java-x/org/sikuli/script/Region.html#void%20onAppear(PSC,org.sikuli.script.SikuliEventObserver))
--3. start observing
use either (your workflow waits)
http://sikuli.org/doc/java-x/org/sikuli/script/Region.html#observe(double)
or (observing in background)
http://sikuli.org/doc/java-x/org/sikuli/script/Region.html#observeInBackground(double)
When running in background observing HAS TO BE stopped in the handler
(server callback).
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.