量角器测试未在 Firefox 上启动 [英] Protractor test is not starting on Firefox

查看:54
本文介绍了量角器测试未在 Firefox 上启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一组在 chrome 上运行良好的测试,但是当我将功能 browserName 从 chrome 更改为 firefox 时,甚至没有收到错误信息

I have got a set of test that run fine on chrome but when I change the capabilities browserName from chrome to firefox don't even get a error info

//Before
   capabilities: {
         'browserName': 'chrome',
         'chromeOptions': { args: ['--test-type', 'show-fps-counter=true'] }
    },

//After
   capabilities: {
          'browserName': 'firefox'
    },

推荐答案

我发现了 firefox 的问题,基本上我的量角器配置没有使用任何 webdriver 服务器设置而是使用默认服务器,这种方式非常方便,因为没有我自己开始硒

I found the problem with firefox, basically my protractor config was not using any webdriver server setting but was using the default server, this way was quite handy since did not have start selenium by my self

为了解决这个问题,我自己启动了 selenium 服务器,指定了 firefox 和 chrome 驱动程序

In order to fix this issue I am starting selenium server by myself spesifiying firefox and chrome drivers

java -jar "C:\Users\%USERNAME%\AppData\Roaming\npm\node_modules\protractor\selenium\selenium-server-standalone-2.42.1.jar" -Dwebdriver.chrome.driver="C:\Users\%USERNAME%\AppData\Roaming\npm\node_modules\protractor\selenium\chromedriver.exe" -Dwebdriver.firefox.bin="C:\Users\%USERNAME%\AppData\Local\Mozilla Firefox\firefox.exe"

java -jar "C:\Users\%USERNAME%\AppData\Roaming\npm\node_modules\protractor\selenium\selenium-server-standalone-2.42.1.jar" -Dwebdriver.chrome.driver="C:\Users\%USERNAME%\AppData\Roaming\npm\node_modules\protractor\selenium\chromedriver.exe" -Dwebdriver.firefox.bin="C:\Users\%USERNAME%\AppData\Local\Mozilla Firefox\firefox.exe"

这篇关于量角器测试未在 Firefox 上启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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