How to integrate sikuli and selenium with python on Ecllipse IDE

Asked by hemalatha on 2018-01-20

Hi Raiman,

I want to integrate Sikuli and Selenium-python with Eclipse IDE. So i want to execute the python scipt through Eclipse Python interpretor.

Below are the configuration details that am using.

OS : Win 10 64 bit
Python : 2.7
Jython : 2.7beta3
Selenium : 3.8.0
Browser : Chromedriver
IDE : Eclipse Oxygen
Sikuli : 1.1.1

I am just trying to run below code but am getting below error :

from org.sikuli.script import Pattern, Screen
from selenium.webdriver import chrome

if __name__ == '__main__':
    s = Screen(0)

    img = Pattern("C:\Sikuli_Path\Images_gmail_login\img.PNG")
    img1 = Pattern("C:\Sikuli_Path\Images_gmail_login\img1.PNG")
    img2= Pattern("C:\Sikuli_Path\Images_gmail_login\img2.PNG")
    img3= Pattern("C:\Sikuli_Path\Images_gmail_login\img3.PNG")
    img4 = Pattern("C:\Sikuli_Path\Images_gmail_login\img4.PNG")

    chromedriver = "C:\Users\Hemalatha_Yenupuri\Documents\Webdrivers\chromedriver"
    driver = chrome(chromedriver)
    s.type(img,"email login")
    s.type(img2,"<email address hidden>")


Traceback (most recent call last):
  File "C:\Users\Hemalatha_Yenupuri\Ecllipse_Code_Repository\SikuliWithSelenium\src\SeleniumTesting\", line 7, in <module>
    from org.sikuli.script import Pattern, Screen
ImportError: No module named org.sikuli.script

Can you please guide how can i do this ? Any help will be appreciated.


Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
hemalatha (hemalathay) said : #1

Hi Raiman,

   Want one clarify regarding interpreter, So as ur answer should i use Jython interpreter instead of python interpreter.

    Correct me if iam wrong?

RaiMan (raimund-hocke) said : #2

The SikuliX Python API can only be used directly, if you are using the Jython interpreter directly (2.7.1).

Can you help with this problem?

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

To post a message you must log in.