我们如何在Python中将Sikuli与Selenium结合使用? [英] How can we use Sikuli with Selenium in Python?

查看:90
本文介绍了我们如何在Python中将Sikuli与Selenium结合使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我们如何在Java中使用Sikuli.但是我在Python中有一些代码可以自动执行Web应用程序,并且我想在其中使用Sikuli.我在互联网上搜索了很多关于如何在Python中使用Sikuli的信息.但是我没有找到任何与之相关的好资源.

I know that how we can use Sikuli in Java. But I have some code in Python which is automating a web application, and I want to use Sikuli in it. I searched a lot on the Internet about how we can use Sikuli in Python. But I did not find any good resource related to it.

如何在Eclipse的Python项目中导入Sikuli脚本?当我在Eclipse的Python路径中添加sikuli-script.jar文件时,以及当我尝试使用

How can I import Sikuli script in a Python project in Eclipse? When I added the sikuli-script.jar file in the Python path in Eclipse and when I am trying to use

import * from sikuli

然后我得到没有名为sikuli的模块".

Then I am getting "there is no such type of module named sikuli".

推荐答案

Sikuli是用Java编写的工具,因此不能直接在Python代码中使用它.相反,您可以选择在Jython环境中使用它,从而为您提供Python语法并启用正在运行的jar包.如果您不使用很多第三方Python库并且主要坚持通用功能,那么从纯Python到Jython的转移就不会造成太多麻烦.

Sikuli is a tool written in Java and hence you can't use it in your Python code as is. Instead you have the option to use it within a Jython environment, that provides you the Python syntax and enables running jar packages. If you are not using many third party Python libraries and mainly stick to the generic functionality, you shouldn't get into too much trouble transferring from pure Python to Jython.

在SikuliX官方网站上有关于如何在Jython中使用Sikuli的明确说明.如果您有任何相关问题,可以在此处发布.

There are clear instructions of how to use Sikuli with Jython on SikuliX official website. If you have any related questions, you can post the here.

这篇关于我们如何在Python中将Sikuli与Selenium结合使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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