Selenium server is up and running but getting failing to connect to selenium

1.6k Views Asked by At

I am trying to set up webdriverio test automation. when I ran the selenium-standalone install. I can get all the packages installed.

selenium packages in nodemodules folder

But when I try to run the commang "

selenium-standalone start

" I am getting the below error message.

11:46:41.260 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
11:46:41.373 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
2019-02-12 11:46:41.429:INFO::main: Logging initialized @411ms to org.seleniumhq.jetty9.util.log.StdErrLog
11:46:41.705 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
11:46:42.103 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
C:\dev\v5\flatsite-qaautomation\node_modules\selenium-standalone\bin\selenium-standalone:79
        throw err;
        ^

Error: Unable to connect to selenium
    at Timeout.hasStarted [as _onTimeout] (C:\dev\v5\flatsite-qaautomation\node_modules\selenium-standalone\lib\check-started.js:17:10)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)

Any help on this is much appreciated.

1

There are 1 best solutions below

0
Gaurav On

Try to add 127.0.0.1 localhost in your

sudo open -a TextEdit /etc/hosts

Save and close the file. Start selenium server again