如何将Sikuli脚本集成到Selenium中? [英] How to integrate Sikuli scripts into Selenium?

查看:86
本文介绍了如何将Sikuli脚本集成到Selenium中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在广泛使用进行集成测试.适用于所有常规内容(HTML/AJAX),但是当我尝试测试第三方ActiveX,Java applet和Flash组件时却一无所获.

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.

为此找到的解决方案是 Sikuli .在本地运行良好,但是如何将其集成到Selenium中?

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

顺便说一句.如果相关的话,对于Selenium,我正在使用Python API.

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

推荐答案

请参阅Selenium RC文档的Python部分: http://seleniumhq.org/docs/05_selenium_rc.html#python

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

您也许可以从Jython运行Selenium测试.在这种情况下,您只需将Selenium脚本集成到Sikuli脚本中即可.

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

在Sikuli IDE中尝试以下操作.您可能需要修改import语句以指向Selenium项目中的特定文件.

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...

此人似乎已经成功控制了Jython的硒: http://adam.goucher.ca /?p = 367

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

我的结论:呆在Jython并从那里控制Selenium可能是最容易的.您可以将这两个工具集成到一个脚本中.

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.

这篇关于如何将Sikuli脚本集成到Selenium中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆