sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #25396
Re: [Question #247294]: Sikuli: In Eclipse with PyDev and Jython i am getting ImportError: No module named sikuli
Question #247294 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/247294
Status: Answered => Open
Cisum4 is still having a problem:
Hi Raiman,
Thanks for your help. I made good progress but i still have an issue:
1. In my mainTest.py file i have:
import unittest
import org.sikuli.basics.SikuliXforJython
from sikuli import *
from Sim_T_BasketBallHoop import * # supposing, scripts live in same directory
suite = unittest.TestLoader().loadTestsFromTestCase(TestFirstSikuli) # see comment
unittest.TextTestRunner(verbosity=2).run(suite)
2. In Sim_T_BasketBallHoop.py i have:
from sikuli import *
import unittest
class TestFirstSikuli(unittest.TestCase):
def testFirst(self):
exists("1393010127389.png")
click("1393010136847.png")
3. The problem i am facing is that the Functions "exists", "click" etc. have a Red cross on them
with a message "undefined variable:exits" and "undefined variable:click" as a result when i run the file i get the following error:
4.
Finding files... done.
Importing test modules ... done.
[error] 1393010127389.png looks like a file, but not on disk. Assume it's text.
[error] Region.find(text): text search is currently switched off
[error] Region.exists: seems that imagefile could not be found on disk
[error] 1393010136847.png looks like a file, but not on disk. Assume it's text.
[error] Region.find(text): text search is currently switched off
======================================================================
ERROR: testFirst (Sim_T_BasketBallHoop.TestFirstSikuli)
----------------------------------------------------------------------
Traceback (most recent call last):
File "I:\Users\QA\Eclipse\workspace\sikuliPython\src\Sim_T_BasketBallHoop.py", line 16, in testFirst
click("1393010136847.png")
FindFailed: FindFailed: Text search currently switched off
Line 1671, in file Region.java
----------------------------------------------------------------------
Ran 1 test in 0.963s
FAILED (errors=1)
-------------------------------
Note that i have references to both:
External Libs>Sikuli/sikuli-java.jar
External Libs>libs/Lib
Sorry for the long email. But hope it explains my problem clearly. I did
my best and getting closer to running the test suite but need some more
help.
Thanks,
On Sunday, April 20, 2014 1:01 AM, RaiMan <question247294@xxxxxxxxxxxxxxxxxxxxx> wrote:
Your question #247294 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/247294
Status: Open => Answered
RaiMan proposed the following answer:
The above docs are only valid up to RC3
Do the following, to get things ready:
- remove the libs folder from the setup folder - it will be recreated at runtime
- additionally the libs folder then will contain a folder Lib (the Sikuli Jython stuff)
- remove the reference "Sikuli-java.jar\libs" from your project
- add a reference to sikuli-setup-folder/libs/Lib (ignore the "not found message at next run)
For the rest look here:
https://github.com/RaiMan/SikuliX-API/wiki/Usage-in-Java-programming
If your system path already is valid for use with Sikuli 1.0.1, then
ignore the respective
part.
Sorry for the docs not yet being ready consistently for 1.0.1
--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/sikuli/+question/247294/+confirm?answer_id=0
If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/sikuli/+question/247294
You received this question notification because you asked the question.
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.