无法在Safari上运行测试-我们需要开发者证书吗 [英] Unable to run tests on Safari - Do we need dev certificate
问题描述
我正在尝试在Safari上进行量角器测试.在研究过程中,我了解到使用量角器时无需下载特定于Safari的任何内容,因为该驱动程序附带了该驱动程序.尝试运行测试时,出现找不到Safari驱动程序"消息.然后,我从下面的链接为Safari安装了此扩展程序.
I am trying to run my protractor tests on Safari. While researching, I learnt that you need not download anything in specific for Safari when using protractor because the driver comes with it. When attempting to run my tests I was getting "No Safari driver" found message. Then I installed this extension for Safari - from the link below.
https://code.google.com/p/selenium/wiki/SafariDriver
http://selenium-release.storage.googleapis.com/index.html?path=2.45/
此扩展名确实显示在首选项中-Safari上的扩展名.在运行测试时,我首先得到了它,然后导航到空白"窗口.此后什么都没有发生...我们是否必须购买Apple dev订阅才能使用野生动物园?我希望在iOS设备上运行Appium测试,但我怀疑Safari是否可以在移动浏览器上正常工作.
This extension does show up on preference - Extension on Safari. While running my tests, I initially get this and then it navigates to Blank window. Nothing happens after that... Do we have to buy the Apple dev subscription in order for us to use safari? I was hoping to run my appium tests on iOS devices and I doubt that Safari will work even with mobile browsers.
我有什么选择?是在Mac上使用Safari的唯一付费方式吗?
What are my options? Is paying the only way to get Safari work on a Mac?
我有MacBook Pro-优胜美地-10.10.4 Safari-8.0.7
I have MacBook Pro - Yosemite - 10.10.4 Safari - 8.0.7
[0.002s] [safaridriver.client]正在连接SafariDriver浏览器扩展... [0.002s] [safaridriver.client]如果您尚未从以下位置安装最新的SafariDriver扩展程序,则此操作将失败 http://selenium-release.storage.googleapis.com/index.html [0.003s] [safaridriver.client]通过单击Safari工具栏上的Selenium [✓]按钮可以查看扩展日志 [0.005s] [safaridriver.client]已连接到扩展 [0.006s] [safaridriver.client]正在请求扩展名,以ws://localhost:13871
[ 0.002s] [safaridriver.client] Connecting to SafariDriver browser extension... [ 0.002s] [safaridriver.client] This will fail if you have not installed the latest SafariDriver extension from http://selenium-release.storage.googleapis.com/index.html [ 0.003s] [safaridriver.client] Extension logs may be viewed by clicking the Selenium [✓] button on the Safari toolbar [ 0.005s] [safaridriver.client] Connected to extension [ 0.006s] [safaridriver.client] Requesting extension connect to client at ws://localhost:13871
推荐答案
我已经安装了Selenium 2.45,这就是我使SafariDriver在带有Selenium 2.46的OS X 10.9.5上运行的目的:
I had Selenium 2.45 installed, and this is what I did to get SafariDriver working on OS X 10.9.5 with Selenium 2.46:
- 从Safari卸载当前的SafariDriver(首选项>扩展> WebDriver 2.45.0>卸载)
- 下载Java Selenium 2.46并解压缩( http://selenium-release.storage.googleapis.com/2.46/selenium-java-2.46.0.zip )
- 解压缩
/selenium-2.46.0/selenium-java-2.46.0.jar
- 找到并双击
/selenium-2.46.0/selenium-java-2.46.0/org/openqa/selenium/safari/SafariDriver.safariextz
- Uninstall current SafariDriver from Safari (Preferences > Extensions > WebDriver 2.45.0 > Uninstall)
- Download and unzip Selenium 2.46 for Java (http://selenium-release.storage.googleapis.com/2.46/selenium-java-2.46.0.zip)
- Unzip
/selenium-2.46.0/selenium-java-2.46.0.jar
- Find and double-click
/selenium-2.46.0/selenium-java-2.46.0/org/openqa/selenium/safari/SafariDriver.safariextz
我相信这将安装SafariDriver 2.46.0.它将在Safari中列为WebDriver 2.45.0
,但文件日期较新,并且对我有用.
This will install, what I believe is, SafariDriver 2.46.0. It will be listed in Safari as WebDriver 2.45.0
, but the file date is newer, and it worked for me.
这篇关于无法在Safari上运行测试-我们需要开发者证书吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!