Not able to start firefox for protractor automation angular 2 + angular cli
See original GitHub issueI am using the following npm command to run the automation tests.
webdriver-manager clean && webdriver-manager update && ng e2e
I have firefox as one of my multiCapabilities for protractor.conf.js.
But I could not able to launch firefox. It is throwing the following error.
[17:37:20] E/launcher - Unable to parse new session response: {"value": {"sessionId":"389d1b05-d48b-3e4d-8ba6-a763a75f6719","value":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"52 .0.2","moz:accessibilityChecks":false,"moz:processID":8904,"moz:profile":"/var/folders/md/9vtqtrxs4f52kl2dsymc5w1mjn7g_z/T/rust_mozprofile.LeFhKUQqBlZN","pageLoadStrategy":"normal","platformName":"darwin", "platformVersion":"15.6.0","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"page load":300000,"script":30000}}}}
Note: I am using directConnect:true
in configuration. If I use directConnect:false
, I am getting geckodriver path error in console which I need to set it manually. I was expecting angular-cli will take care of it automatically which doesn’t.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
You can just leave
directConnect
out of your config. You’ll needseleniumAddress: "http://localhost:4444/wd/hub"
, and then you’ll need to be running a selenium server withwebdriver-manager start
. The protractor cookbook is a good example of how to set that up.Safari and IE will not work with directConnect. That wouldn’t have even been possible until Selenium 3, which released this year. Now that it is possible, I don’t know if there are plans to support it. As things are, directConnect only works with Chrome, and may possibly work with FF again in the future. The reason directConnect can be so troublesome is that it uses the JS selenium client to talk directly to the browser driver. This client is still a bit unstable after the big Selenium 3.0 release, and it tends to be very sensitive to the browser version.
I generally recommend people use selenium standalone where possible. The selenium server actually does a lot of work to translate between different versions of the WebDriver protocol, and it’s usually more updated and reliable when it comes to supporting different browsers. It’s a little more effort to set up (though it should just be as easy as
webdriver-manager start
), but it’s a lot more reliable.