Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate Sikuli scripts into Selenium?

I'm extensively using Selenium for integration testing. Works great for all normal stuff (HTML/AJAX), but no go when I'm trying to test third party ActiveX, Java applets and Flash components.

The solution I've found for this is Sikuli. Works great locally, but how can I integrate that into Selenium?

btw. if that's relevant, for Selenium I'm using Python API.

like image 902
vartec Avatar asked Sep 08 '10 09:09

vartec


People also ask

How do you add Sikuli dependency in POM XML?

Creating The Sikuli Maven ProjectStep #1) Open Eclipse and create a new Maven Project. Step #2) Add the following dependencies in your POM file. Step #3) Create a package inside src/test/java and Create a class inside the package. Now you can start writing the Sikuli script inside this class.

What is the difference between selenium and Sikuli?

Selenium is used for Web-Automation or Web Applications or website related automation. Autoit can only be used for Windows GUI Automation or Windows based applications. No Image Recognition purely on elements based usage. Sikuli on the other hand, can be used for automating both i.e. Desktop Apps and Web-Apps.


1 Answers

See the Python section of the Selenium RC documentation: http://seleniumhq.org/docs/05_selenium_rc.html#python

You may be able to run Selenium tests from Jython. In that case, you can simply integrate Selenium scripts into your Sikuli scripts.

Try the following in the Sikuli IDE. You may need to modify the import statements to point to specific files in the Selenium project.

from selenium import selenium    # this will probably need tweaking...

slm = selenium("localhost", 4444, "*firefox", "http://www.google.com/")
slm.start()
# etc...

This guy appears to have had success controlling Selenium from Jython: http://adam.goucher.ca/?p=367

My conclusion: it will probably be easiest to stay in Jython and control Selenium from there. You could integrate both tools into a single script.

like image 199
Roy Tinker Avatar answered Sep 23 '22 14:09

Roy Tinker