Can't invoke methods(click, hover, .. etc) from another script using IDE
Asked by
IvanKovtunov
Please, observe my example:
Script1.sikuli contents:
import Script2
Script2.
Script2.sikuli contents:
def runScript2():
print("Try to click")
click("Screen Shot 2019-01-06 at 18.17.22.png")
print("DONE")
I run Script1 and get console output:
Try to click
[error] script [ Script1 ] stopped with error in line 2
[error] NameError ( global name 'click' is not defined )
[error] --- Traceback --- error source first
line: module ( function ) statement
3: Script2 ( runScript2 ) click("Screen Shot 2019-01-06 at 18.17.22.png")
[error] --- Traceback --- end --------------
Why global name 'click' is not defined? Can you provide the right way how to run script from another script? Is it possible with IDE to do so? Thanks.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply:
To post a message you must log in.