using sikuli with robot framework

Asked by Abhishekgupta on 2016-12-19

I am new to sikuli. I started using sikulix with robot framework. I want to dynamically execute sikuli api’s using robot framework. I am facing “ILLLEGALMONITORSTATEEXCEPTION” while executing “wait” command using robot framework.

*****Here is the sikuli code*********
from sikuli import *
import shutil
from os import *
from robot.api import logger
currentDirectory = os.path.dirname(getBundlePath())
setBundlePath("SikuliRunner.sikuli")
if not currentDirectory in sys.path: sys.path.append(currentDirectory)

screen = Screen()
class SikuliRunner(object):
    def __init__(self):
        self.appCoordinates = (0, 0, 1024, 768)

    def sikulirunner(self, name, *args):
        functionName = name
        function = getattr(sys.modules[__name__], name)
        returnValue = function(*args)
        return returnValue

***Here is the robot .txt file script***
***Settings***
Library SikuliRunner.SikuliRunner WITH NAME sikuliRunner
Library String
Library Screenshot

***Test Cases***
Verify User Module
 [Documentation] Sample program to check wait function
 sikuliRunner system start chrome http://google.com
 pause C:\\robot\\src\\1482144972382.png
 sikuliRunner type gmail

please help

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2016-12-19
Last reply:
2016-12-19
RaiMan (raimund-hocke) said : #1

Sorry, but you have to track down the problem on your own, since your usage of SikuliX with RFW is somewhat unusual (at least to me ;-).

With SikuliX 1.1.1 (http://sikulix.com) there is another tested option:

http://sikulix-2014.readthedocs.io/en/latest/scenarios.html#using-robotframework

Can you help with this problem?

Provide an answer of your own, or ask Abhishekgupta for more information if necessary.

To post a message you must log in.