← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #268529]: where is sikuli-script.jar equivalent when integrating with Robotframework, Selenium

 

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

RaiMan posted a new comment:
starting to comment your stuff

***** the start of your program is not correct:

--- you have:
import org.sikuli.basics.SikulixForJython
# from sikuli.Sikuli import *
from robotremoteserver import RobotRemoteServer
from org.sikuli.script import *

--- but MUST be
import org.sikuli.basics.SikulixForJython
from sikuli import *
from robotremoteserver import RobotRemoteServer
# from org.sikuli.script import * # THIS IS SIMPLY forbidden!!!
# the API needed for Jython scripting is made available by 
# from sikuli import *

**** use exists() instead of wait to avoid exception handling:

instead of 
try:
  self.SS.wait(self.PT, float(timeOut))
except:
  ...

use 
if not self.SS.exists(self.PT, float(timeOut)):
    # handle the failed situation
# continue with the normal workflow

use

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