sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #33304
[Question #268663]: 'runScript' is not defined
New question #268663 on Sikuli:
https://answers.launchpad.net/sikuli/+question/268663
Hi,
I am using SikulixIDE 1.1.0 which really a good tool ;) but when trying to launch several scripts I cannot use the function "runScript".
I Have 2 scripts (MainScript and LoginFromExactUserName) :
#MainScript
from sikuli.Sikuli import *
from sikuli import *
import unittest
class MyTest(unittest.TestCase):
def testBatch(self):
Settings.MyUserName = "Administrator"
currentResult = runScript("Y:/Scripts/LoginFromExactUserName")
self.assertEqual(currentResult,1)
Settings.MyUserName = "Super manager"
currentResult = runScript("Y:/Scripts/LoginFromExactUserName")
self.assertEqual(currentResult,1)
suite = unittest.TestLoader().loadTestsFromTestCase(WynsureUS54Test)
unittest.TextTestRunner(verbosity=2).run(suite)
#LoginFromExactUserName
from sikuli.Sikuli import *
from sikuli import *
UserName = Settings.MyUserName
print UserName
===============================================
Here is the log I get when running from IDE "MainScript":
testBatch (__main__.WynsureUS54Test) ... ERROR
===============================================
ERROR: testBatch (__main__.WynsureUS54Test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Y:\Scripts\Patrice\MainScript.sikuli\MainScript.py", line 8, in testBatch
currentResult = runScript("Y:/Scripts/Patrice/LoginFromExactUserName")
NameError: global name 'runScript' is not defined
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)
1.1.0(2015-01-14_01:00nightly)/Windows6.1/Java7(amd64)1.7.0_79-b15
=================================================
Any idea of why this runScript function is not defined, I missed some declaration ?
Thank you for your help.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.