← Back to team overview

sikuli-driver team mailing list archive

[Question #687794]: Calling a click from a sub-routine causes an exception.

 

New question #687794 on Sikuli:
https://answers.launchpad.net/sikuli/+question/687794

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(1000,1000)
print result

the called routine:

def test_auction(high_bid,low_bid):


            click(Pattern("1575297163479-1.png").similar(0.80))

The error message:

[error] script [ ttauction ] stopped with error in line 2
[error] FindFailed ( 1575297163479-1.png: (37x31) in R[0,0 1680x1050]@S(0) )
[error] --- Traceback --- error source first
line: module ( function ) statement 
5: Sauction (  test_auction )     click(Pattern("1575297163479-1.png").similar(0.80))
2: main (  <module> )     result = test_auction(1000,1000)
[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.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.