Calling a click from a sub-routine causes an exception.
Below is a simple test case which shows the problem. The click command if called on its own works fine, however if you try to call it from a sub-routine then you get an exception saying the image file could not be found
result = test_auction(
print result
the called routine:
def test_auction(
The error message:
[error] script [ ttauction ] stopped with error in line 2
[error] FindFailed ( 1575297163479-
[error] --- Traceback --- error source first
line: module ( function ) statement
5: Sauction ( test_auction ) click(Pattern(
2: main ( <module> ) result = test_auction(
[error] --- Traceback --- end --------------
This is Sikuli 2.0.1 on Windows 10 (64 bit). I have also tried without the similar option and that makes no difference . I also tried a sub-routine with o parameters and again no difference.
The image does exist before the call is made there is no waiting for an image to appear. The code runs ok on the same page if not called from the subroutine.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
This question was originally filed as bug #1858343.