sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #07078
Re: [Question #179495]: onAppear and observe with Robot Framework
Question #179495 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/179495
Status: Answered => Open
Peter Kim is still having a problem:
I created functions called suite_setup and suite_teardown. I placed
onAppear and observe calls in suite_setup and stopObserver call in
suite_teardown.
def repeat_alarm(image):
assert(exists(image))
v.click(image)
print "repeat_alarm: A reminder was set."
v.click("1318980623175-1.png")
def suite_setup():
...
set_alarm()
v.onAppear("giHAIWE.png", repeat_alarm("HAIWE.png"))
v.observe(FOREVER,background=True)
...
def suite_teardown():
...
v.stopObserver()
...
The main routine looks like:
suite_setup()
test_setup()
test_function1()
test_teardown()
test_setup()
test_function2()
test_teardown()
...
suite_teardown()
When I run this in Sikuli IDE, I get the following error message:
suite_setup: setting alarm ...
set_alarm: An alarm was set.
suite_setup: watch for an alarm ...
[error] 중지됨 <--- STOPPED
[error] 776 번째 행에서 오류 발생 <- ERROR on line 776
[error] 에러 메시지: Traceback (most recent call last): <--- Error Message
File "C:\Users\pd.kim\AppData\Local\Temp\sikuli-tmp3971633246168076025.py", line 776, in
suite_setup()
File "C:\Users\pd.kim\AppData\Local\Temp\sikuli-tmp3971633246168076025.py", line 127, in suite_setup
v.onAppear("giHAIWE.png", repeat_alarm("HAIWE.png"))
File "C:\Users\pd.kim\AppData\Local\Temp\sikuli-tmp3971633246168076025.py", line 106, in repeat_alarm
assert(exists(image))
AssertionError
The handler function repeat_alarm is passed an image which will be clicked in the function.
What am I doing wrong?
Thanks.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.