无法连接到 SafariDriver (Safari 10) [英] Failed to connect to SafariDriver (Safari 10)

查看:93
本文介绍了无法连接到 SafariDriver (Safari 10)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 mac 上为 safari 运行量角器测试时出现以下错误

I'm getting the following error when running my protractor test on mac for safari

Failed to connect to SafariDriver after 10082 ms
Build info: version: '2.53.1', revision: 'a36b8b1',     
os.arch: 'x86_64', os.version: '10.12.2', java.version: '1.8.0_101'
Driver info: driver.version: SafariDriver

能力:

        name: 'Safari',
        browserName: 'safari',
        logName: 'Safari',
        shardTestFiles: true,
        maxInstances: 2

为此我们需要特定的 safari 驱动程序吗?如果是,我可以从哪里获得它以及它应该在 .conf 文件中声明的位置.

Do we need a specific safari driver for this? If yes, where can I get it from and where should it be declared in the .conf file.

谢谢!

推荐答案

是的,需要安装 一个特定的 safari 驱动程序,以便在量角器内启动它.当然,你需要在 mac 上.Protractor本质上是建立在Selenium之上的一层,所以需要安装Safari的selenium驱动,实现作为 Safari 插件.

Yes, you need to install a specific safari driver in order to launch it inside of protractor. And of course, you need to be on a mac. Protractor is essentially a layer built on top of Selenium, so you need to install the selenium driver for Safari, which is implemented as a Safari plugin.

这是您需要做的:

  1. 此处下载 safari 插件.
  2. 运行插件
  3. 在 safari 提示时选择信任"插件
  1. Download the safari plugin from here.
  2. Run the plugin
  3. Select "Trust" the plugin when prompted by safari

驱动程序现已安装,应该可用于您的量角器进程.

The driver is now installed and should be available to your protractor process.

这是 Selenium 2.48 的驱动程序.我找不到更新的版本,因此如果此驱动程序版本不能与当前版本的量角器一起运行,您将需要使用基于 Selenium 2.48 的旧版本量角器或从源代码构建 safari 驱动程序.

This is the driver for Selenium 2.48. I couldn't find a more recent build, so if this driver version doesn't run with the current version of Protractor, you will need to either use an older version of protractor that is based on Selenium 2.48 or build the safari driver from source.

这篇关于无法连接到 SafariDriver (Safari 10)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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