question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to start firefox for protractor automation angular 2 + angular cli

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
heathkitcommented, May 1, 2017

You can just leave directConnect out of your config. You’ll need seleniumAddress: "http://localhost:4444/wd/hub", and then you’ll need to be running a selenium server with webdriver-manager start. The protractor cookbook is a good example of how to set that up.

1reaction
heathkitcommented, Apr 20, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to start firefox for protractor automation angular 2 + angular cli
I am using the following npm command to run the automation tests. webdriver-manager clean && webdriver-manager update && ng e2e. I have firefox...
Read more >
Tutorial - Protractor - end-to-end testing for AngularJS
Try running the tests again. You should see the tests running on Firefox instead of Chrome. The capabilities object describes the browser to...
Read more >
Download Protractor (PDF Version) - Tutorialspoint
Protractor is an open source end-to-end testing framework for Angular and AngularJS applications. It was built by Google on the top of WebDriver....
Read more >
Setting up your own test automation environment
In this article, we will teach you how to install your own automation environment and run your own tests using Selenium/WebDriver and a ......
Read more >
▷ Top 40 Protractor Interview Questions and Answers *2022
Supports parallel testing. Cost, Open-source, Open-source. Ease to automate Angular Applications, Not easy; a number of sync problems, and hard ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found