← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #252490]: [1.0.1] Sikuli integration Robot framework --- use sikuli-java.jar

 

Question #252490 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252490

    Status: Open => Answered

RaiMan proposed the following answer:
ok, then you should now switch off the logging and try to run your test:

in calc you only need the 2 lines at the beginning
import org.sikuli.basics.SikuliXforJython
from sikuli import *

addImagePath("calc.sikuli")
needs a complete absolute path to work.

In your case, this should work:
addImagePath(sys.path[0])

since the first entry seems to contain the absolute path to calc.sikuli.

a more general solution would be:
scriptName = "calc.sikuli"
for e in sys.path:
    if e.endswith(scriptName):
        addImagePath(e)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.