我正在尝试使用Nightwatch.js对网站进行自动测试,而我正在使用macOS High Sierra . 所以我开始使用文档中所述的Selenium Standalone Server进行测试 . Chrome测试工作正常,我没有问题 . 但我似乎无法使Firefox测试工作,我一直在测试和在线搜索修复,但我放弃了,因为我找不到任何解决方案 . 这是我的nightwatch.json配置文件 .

{

"src_folders": [

"test"

],

"output_folder": "reports",

"custom_commands_path": "",

"custom_assertions_path": "",

"page_objects_path": "",

"globals_path": "",

"selenium": {

"start_process": true,

"server_path": "./bin/selenium-server-standalone-3.13.0.jar",

"log_path": "",

"port": 4444,

"cli_args": {

"webdriver.chrome.driver": "./bin/chromedriver",

"webdriver.gecko.driver": "./bin/geckodriver",

"webdriver.firefox.profile": "nightwatch"

}

},

"test_settings": {

"default": {

"launch_url": "https://www.google.com",

"selenium_port": 4444,

"selenium_host": "127.0.0.1",

"default_path_prefix": "",

"silent": true,

"screenshots": {

"enabled": false,

"path": ""

},

"desiredCapabilities": {

"browserName": "firefox",

"javascriptEnabled": true,

"acceptSslCerts": true,

"marionette": true

}

},

"chrome": {

"desiredCapabilities": {

"browserName": "chrome",

"chromeOptions": {

"args": [

"--load-extension=/Users/jackch/Downloads/chrome, --url-base=/wd/hub"

]

}

}

}

}

}

然后当我在终端中运行 nightwatch -e --verbose 时,我得到了相同的错误 Error retrieving a new session from the selenium server Connection refused! Is selenium server started? . 我尝试了很多东西:

1)我在默认端口4444上的一个单独的终端中启动了geckodriver,这里是来自geckodriver的日志:

2018-07-23 12:09:03.432 plugin-container[27769:6329668] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7903, name = 'com.apple.tsm.portname'

See /usr/include/servers/bootstrap_defs.h for the error codes.

2018-07-23 12:09:03.559 plugin-container[27769:6329668] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7943, name = 'com.apple.coredrag'

See /usr/include/servers/bootstrap_defs.h for the error codes.

2018-07-23 12:09:03.624 plugin-container[27770:6329696] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7b37, name = 'com.apple.tsm.portname'

See /usr/include/servers/bootstrap_defs.h for the error codes.

2018-07-23 12:09:03.713 plugin-container[27770:6329696] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7bcf, name = 'com.apple.coredrag'

See /usr/include/servers/bootstrap_defs.h for the error codes.

1532336943850 Marionette INFO Listening on port 52869

2018-07-23 12:09:04.333 plugin-container[27771:6329828] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7d07, name = 'com.apple.tsm.portname'

See /usr/include/servers/bootstrap_defs.h for the error codes.

2018-07-23 12:09:04.413 plugin-container[27771:6329828] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7d83, name = 'com.apple.coredrag'

See /usr/include/servers/bootstrap_defs.h for the error codes.

2)然后我试图改变 geckodriver 的端口,因为我认为他们可能会因为Selenium和gecko都选择了4444端口,但没有任何改变 .

3)我试图单独启动Selenium服务器然后链接它 . 这意味着我在nightwatch.json中将 "start_process" 设置为false . 我仍然无法使其发挥作用 .

这是我运行 nightwatch -e --verbose 后的完整消息:

Starting selenium server... started - PID: 28112

[Test] Test Suite

=====================

Running: Login

INFO Request: POST /session

- data: {"desiredCapabilities":{"browserName":"firefox","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY","marionette":true,"name":"Test"}}

- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":145}

INFO Response 200 POST /session (1721ms) { value:

{ sessionId: '187e2af1-54a1-224a-9b8d-d4ff9f3913c7',

capabilities:

{ acceptInsecureCerts: false,

browserName: 'firefox',

browserVersion: '61.0.1',

'moz:accessibilityChecks': false,

'moz:headless': false,

'moz:processID': 28131,

'moz:profile': '/var/folders/vw/j4dsztz17sj_vtk500lv09r00000gn/T/rust_mozprofile.GRCHbtKdy2zm',

'moz:useNonSpecCompliantPointerOrigin': false,

'moz:webdriverClick': true,

pageLoadStrategy: 'normal',

platformName: 'darwin',

platformVersion: '17.7.0',

rotatable: false,

timeouts: { implicit: 0, pageLoad: 300000, script: 30000 } } } }

Error retrieving a new session from the selenium server

Connection refused! Is selenium server started?

{ value:

{ sessionId: '187e2af1-54a1-224a-9b8d-d4ff9f3913c7',

capabilities:

{ acceptInsecureCerts: false,

browserName: 'firefox',

browserVersion: '61.0.1',

'moz:accessibilityChecks': false,

'moz:headless': false,

'moz:processID': 28131,

'moz:profile': '/var/folders/vw/j4dsztz17sj_vtk500lv09r00000gn/T/rust_mozprofile.GRCHbtKdy2zm',

'moz:useNonSpecCompliantPointerOrigin': false,

'moz:webdriverClick': true,

pageLoadStrategy: 'normal',

platformName: 'darwin',

platformVersion: '17.7.0',

rotatable: false,

timeouts: [Object] } } }

感谢您提供的任何帮助 .

激活手表显示无法登陆服务器,在Firefox中使用Nightwatch运行测试无法连接到Selenium服务器...相关推荐

  1. 服务器正在维护中王者荣耀,王者荣耀7月服务器正在维护中_王者荣耀7月3日服务器正在维护中解决方法_游戏吧...

    王者荣耀7月3日出现了服务器正在维护中的问题,想必大家都很想知道这到底怎么回事吧.下面游戏吧小编就为大家带来了王者荣耀部分召唤师暂时无法登录游戏异常说明公告. 亲爱的召唤师: 老亚瑟发现部分召唤师在7 ...

  2. 阴阳师人数最多的服务器,说说阴阳师中玩家最少的几个鬼区服务器

    任何游戏都避免不了玩家退坑和人数衰减的问题,阴阳师也是一样,相信对于出入坑的玩家来说,肯定不希望进入一个人数较少的服务器和鬼区,那样玩起来也没意思,虽然现在阴阳师的组队系统都开起了跨服模式了,不过本区 ...

  3. webService未能连接到服务器,WebService:firefox无法在192.168.10.203:8080与服务器建立连接...

    我正在尝试创建一个WebService.我无法访问该URL.如果我尝试连接到 http://192.168.10.203:8080/EchoBeanService/EchoBean?wsdl 我得到了 ...

  4. 触摸屏显示无法连接到服务器,wincc flexible软件打开时提示“无法连接到SQL服务器-工业支持中心-西门子中国...

    应该是某个组件出问题了,建议重装wincc flexible 回答者: 暗夜精灵 2013-08-21 08:47 暗夜精灵 - 初级工程师&nbsp&nbsp第9级 重做系统,再安装 ...

  5. 如何把托管的网站放到服务器,web-server – 在家中托管网站,ftp和随机使用的服务器?...

    嘿Zolomon,恭喜接受这个倡议!为长期但令人兴奋和有益的道路做好准备. 这是我的提示(简短和甜蜜): 1.如果您正在做任何需要可靠性的事情,我会让自己保持安全,因此如果您遇到硬件故障等,主机应对此 ...

  6. 购买虚拟服务器会计,购买云服务器在会计中怎么做账

    购买云服务器在会计中怎么做账 内容精选 换一换 华为云帮助中心,为用户提供产品简介.价格说明.购买指南.用户指南.API参考.最佳实践.常见问题.视频帮助等技术文档,帮助您快速上手使用华为云服务. 计 ...

  7. 游戏维护关闭服务器,游戏服务器正在维护中

    游戏服务器正在维护中 内容精选 换一换 用户创建裸金属服务器后,可以通过"申请状态"栏查看任务的创建状态.创建裸金属服务器的任务可以包括创建裸金属服务器资源.绑定弹性公网IP.挂载 ...

  8. 无法将mysql服务器连接到_无法从java连接到mysql服务器

    我在这行代码中收到错误"Communications link failure": mySqlCon = DriverManager.getConnection("jdb ...

  9. 网关到服务器显示异常,登陆网关异常 服务器异常

    登陆网关异常 服务器异常 内容精选 换一换 ELB的常见异常返回码有400.403.502.504等.若遇到这些返回码建议您先直接访问后端云服务器,查看是否是后端云服务器的异常.若后端云服务器响应正常 ...

最新文章

  1. SAP Spartacus My Company url的数据源, 来自Sampledataaddon
  2. 老司机实战Windows Server Docker:4 单节点Windows Docker服务器简单运维(下)
  3. Python使用matplotlib.pyplot绘图时设置坐标轴刻度
  4. 在吗?我要讲件大事了,你绝对不知道CSDN公众号还有这个功能!错过后悔!
  5. post方式加载iframe
  6. 使用cfssl生成证书时报json: cannot unmarshal object into Go value of type []csr.Name错误
  7. 【STM32 .Net MF开发板学习-09】AD模拟量采集
  8. 三星s10刷android原生,【极光ROM】-【三星S10E/S10/S10+ G97XX-9820】-【V12.0 Android-Q-TD1】...
  9. 如何写软件概要设计?
  10. wps word文字样式管理
  11. win7系统文件夹共享后有锁图标怎么去掉?
  12. ICPC-无限路之城(数学+思维)
  13. 干货 | DDD实战:基于洋葱模型的分层代码架构设计
  14. 第九届蓝桥杯 省赛 C语言A组
  15. 使用CSS Flexbox 构建可靠实用的网站 Header
  16. 2020年3月31日 失眠问题解决之道 ~ 观想法②
  17. 腾讯技术解读|CDG—金融科技和腾讯广告AMS的神秘武器
  18. Linux Load Averages: Solving the Mystery
  19. 亚信科技前端实习面试题
  20. 3.数据挖掘——房价项目预测(三)Pandas学习

热门文章

  1. 火狐 4 月全球使用量首超微软
  2. 浅谈电子政务门户建设选型经验
  3. 5月第4周网络安全报告:应用程序漏洞占比达70.3%
  4. 直接拿来用!最火的iOS开源项目
  5. nodejs安装jsdom模块出现MSB4025错误
  6. 突破极限 解决大硬盘上安装Sco Unix新思路
  7. IDEA Maven 项目默认编译项目为JDK 1.5
  8. 活动目录环境下 临时让End user提升权限安装应用软件
  9. 关于CCRANDOM_0_1
  10. 分享13个帮助你简化开发的jQuery插件