Connection refused! Has the selenium server started?

I use Jenkins to run selenium night time tests.

When I run the tests, I get the following error:

Connection refused! Is selenium server started?

I have the following configuration in the nightwatch.json file:

"selenium": {
        "start_process": true,
        "server_path": "lib/selenium-server-standalone-2.52.0.jar",
        "log_path": "",
        "host": "127.0.0.1",
        "port": 4444,
        "cli_args": {
            "webdriver.chrome.driver": "lib/chromedriver",
            "webdriver.ie.driver": "lib/IEDriverServer_x64_2.52.2.exe",
            "trustAllSSLCertificates": true
        }

I guess Jenkins is trying to connect to PORT, but cannot do this. Can anybody help?

+4
source share
1 answer

Make sure browserName is correct.

"desiredCapabilities": {
    "browserName": "internet explorer",
    "javascriptEnabled": true,
    "acceptSslCerts": true
}

browser name: "Internet explorer" and not "ie" also you do not have ".exe" in the webdriver.chrome.driver file

0
source

All Articles