sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #41516
[Question #460618]: from sikuli import *. ImportError: No moude named sikuli
New question #460618 on Sikuli:
https://answers.launchpad.net/sikuli/+question/460618
I am running Sikuli X 1.1.0 on Win7 Professional x64. Jython 2.7.0
I have built several test scripts which run fine in the Sikuli IDE, but do not run correctly from the command line.
Here is my code:
===========================================================================
import unittest
from sikuli import *
class TestType(unittest.TestCase):
def testOpenText(self):
try:
doubleClick("C:/Sikulix1.1.1/TestKeyIn.sikuli/1487128963180.png")
wait("C:/Sikulix1.1.1/TestKeyIn.sikuli/1487129022614.png")
except:
print "StartFailed"
if exists("C:/Sikulix1.1.1/TestKeyIn.sikuli/1487129022614.png"):
type("123456")
sleep(1)
type(Key.ENTER)
sleep(1)
type("KEVIN")
print "OpenText_Succeeded"
assert True
else:
print "OpenText_Failed"
assert False
def testSaveText(self):
try:
sleep(1)
click("C:/Sikulix1.1.1/TestKeyIn.sikuli/1487129113840.png")
sleep(1)
click("C:/Sikulix1.1.1/TestKeyIn.sikuli/1487129165925.png")
print "SaveText_Succeeded"
assert True
except:
print "SaveText_Failed"
assert False
suite = unittest.TestLoader().loadTestsFromTestCase(TestType)
unittest.TextTestRunner().run(suite)
===========================================================================
It can runs at Sikuli IDE.
But if I use windows command line:
jython test.py
I got the error msg:
Traceback <most recent call last>:
File "test.py", line 2, in <module>
from sikuli import *
ImportError: No module named sikuli
Could someone help me please ?
Thanks.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.