Calling a click from a sub-routine causes an exception.

Bug #1858343 reported by Mark McGuinn on 2020-01-05

This bug report was converted into a question: question #687794: Calling a click from a sub-routine causes an exception..

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Undecided
Unassigned

Bug Description

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.

RaiMan (raimund-hocke) wrote :

should be a question first

Changed in sikuli:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers