开发者

How to integrate Sikuli scripts into Selenium?

开发者 https://www.devze.com 2023-01-15 11:37 出处:网络
I\'m extensively using Selenium for integration testing. Works great for all normal stuff (HTML/AJAX), b开发者_如何学Cut no go when I\'m trying to test third party ActiveX, Java applets and Flash comp

I'm extensively using Selenium for integration testing. Works great for all normal stuff (HTML/AJAX), b开发者_如何学Cut 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.


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.


It is possible to have Sikuli capabilities on Selenium Grid. It requires extra libraries to be installed on every node and hub.

Check this project to learn more

https://github.com/sterodium/selenium-grid-extensions


If one doesn't need to use custom or specific test framework, one option is Robot Framework (RF). It has a Selenium library, and there is a how to on how to use Sikuli with RF. With that in mind, you could combine the two together using RF. Plus RF has some nice test automation framework features built in.

robotframework.org

http://blog.mykhailo.com/2011/02/how-to-sikuli-and-robot-framework.html

http://code.google.com/p/robotframework-seleniumlibrary


You can extend the Selenium Server so it will be able to execute SIKULI scripts (see this on how to call them from Java).

However you will need to develop in Java as Selenium Server is a Java app.


If you want to run Sikuli functions remotely on a Selenium Grid, then it seems like you would have to do it with Selenium Augmenter somehow. None of the answers here show how a remote Grid, such as with using SauceLabs, would acquire Sikuli functionality. Perhaps the Selenium project has yet to augment the Augmenter class to load external libraries like Sikuli?

For this reason, when I use Sikuli, I always have to use a non-remote , standard, local, WebDriver instance.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号