python selenium webdriver safari 驱动程序
快速提问,我一直在构建一个 python selenium 框架来测试我们的网站。我已经成功实现了 Firefox、Chrome 和 IE 浏览器测试。但一直在寻找Safari驱动程序。我知道在官方文档中它简要描述了它的不兼容性并且不支持 Safari。你们建议我使用 python 和 selenium 来测试 Safari 功能。使用python可以吗?
我搜索了又搜索,似乎找不到任何相关的 Safari 驱动程序。
提前致谢,
Quick question, I've been building a python selenium framework for testing our site. I have successfully implemented Firefox, Chrome and IE for browser testing. But have been searching for Safari driver. I know in the official documents it briefly describes it's incompatibilities and doesn't support Safari. What would you guys suggest I use for testing Safari functionality with python and selenium. Is it possible using python?
I've searched and search and can't seem to find any related Safari driver.
Thanks in advance,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
请查看这篇博文。这是针对 Java 的,但针对 Python 的过程应该大致相同。
Check out this blog post. It's for Java, but the process for Python ought to be much the same.
本地 SafariDriver 的绑定尚未实现。如果您想要此功能,请在 Selenium 的错误跟踪器中为以下问题加注星标:
The bindings for a local SafariDriver have not yet been implemented. If you want this feature, star the following issue at the bug tracker of Selenium:
我自己没有使用过它,但有一个 Safari 驱动程序 可以实现为向每个页面注入 javascript 的浏览器扩展。
它有一些限制,例如无法处理警报,但希望它能有所帮助。
I haven't used it myself, but there is a Safari driver available implemented as browser extension that injects javascript to each page.
It has some limitations such as not being able to handle alerts, but hopefully it helps.
Safari 驱动程序是一个 Safari 扩展,您可以在 seleniumhq.org 网站的下载部分找到链接。
http://docs.seleniumhq.org/download/
您还可以从 Github 查看源代码并建造它。
Safari 的 Python Selenium 绑定并未真正实现,而是使用 java 实现。实际上,您需要 Selenium-standalone-Server jar 文件。它必须位于运行脚本的计算机上的 PATH 中。
The Safari Driver is a Safari Extension you can find a link to on the downloads section of the seleniumhq.org site.
http://docs.seleniumhq.org/download/
You can also check out the source from Github and build it.
The Python Selenium bindings for Safari are not really implemented,but use the java implementation. As a reaslt you need the Selenium-standalone-Server jar file. It must be in your PATH on the machine that runs the script.
Python 支持运行 Safari 测试,您可以找到 python 示例< /a> 在此博客上的
另一个示例如何通过 selenium 网格调用 Safari 测试,请注意 selenium 网格和节点应该正在运行。
Python support is there to run Safari tests, you can find python example on this blog
another example how to invoke Safari tests over selenium grid, please note selenium grid and node should be running.