Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium unable to create new session

Tags:

selenium

This is coming about because I have a failing Behat test on a search field - the field is added via javascript so I assumed something was wrong with (with my setup of) Selenium.

I found that if I visit http://localhost:4444/wd/hub and click "Create Session", select any of the browsers (android, iphone, firefox, chrome, internet explorer, opera) I get the error message: Unable to create new session.

I'm not sure if the two are related (failing @javacript tests and unable to create a session).

I am starting Selenium with java -jar /usr/local/bin/selenium-server-standalone-3.5.0.jar -port 4444 on osX Sierra 10.12.5.

My current configuration in behat.yml is

javascript_session: selenium2
  goutte: ~
  selenium2:
    wd_host: 'http://localhost:4444/wd/hub'

Although I wouldn't expect that to affect the ability to create a session from /wd/hub.

like image 880
Chris Rockwell Avatar asked Mar 09 '23 06:03

Chris Rockwell


1 Answers

The issue was that I didn't have a driver. I downloaded Gecko Driver, moved the executable to /usr/local/bin and all is well.

like image 194
Chris Rockwell Avatar answered Mar 10 '23 21:03

Chris Rockwell