sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #59051
[Question #707841]: problems when importing other sikuli script
New question #707841 on SikuliX:
https://answers.launchpad.net/sikuli/+question/707841
In the sub script named 'Common':
from sikuli import *
import time
def find_submenu_with_retry(mainMenu, subMenu):
print('find_submenu_with_retry()')
click(mainMenu)
time.sleep(1)
match1 = SCREEN.exists(subMenu)
return match1
In the main script named 'AboutTest':
import Common
reload(Common)
aboutMenu="aboutMenu"
subMenu1="subMenu1"
#okButton1="subMenu11"
match1 = Common.find_submenu_with_retry(aboutMenu, subMenu1)
When I ran the main script, I got the following error messages:
[error] script [ AboutTest ] stopped with error in line 10
[error] NameError ( global name 'click' is not defined )
[error] --- Traceback --- error source first
line: module ( function ) statement
7: Common ( find_submenu_with_retry ) click(mainMenu)
10: main ( <module> ) match1 = Common.find_submenu_with_retry(aboutMenu, subMenu1)
[error] --- Traceback --- end --------------
I am using SikuliX IDE 2.1.0 and Java 17.
I don't know what's wrong.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.