Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Warn user for conflicting selenium arguments in the config file #1945

@skjoshi

Description

@skjoshi

I am new to the protractor. I do not wan to launch webdriver-manager from the command line before running my tests. I want my script to launch the webdriver-manager. I tried setting the '.jar' path inside my config file. But it does not help.
Here is my config file-

exports.config = {
    seleniumServerJar: '/usr/local/lib/node_modules/protractor/selenium/selenium-server-standalone-2.44.0.jar',
    seleniumPort: '4445',
    seleniumArgs: '-help',
    seleniumAddress: 'http://localhost:4445/wd/hub',
    specs: ['spec.js'],
    capabilities: {
        'browserName': 'chrome'
    }
}

Here is the error I am getting when I am trying to run-

Using the selenium server at http://localhost:4445/wd/hub
[launcher] Running 1 instances of WebDriver
ERROR - Unable to start a WebDriver session.

/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:145
      callback(new Error(message));
               ^
Error: ECONNREFUSED connect ECONNREFUSED
    at ClientRequest.<anonymous> (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:145:16)
    at ClientRequest.emit (events.js:95:17)
    at Socket.socketErrorListener (http.js:1552:9)
    at Socket.emit (events.js:95:17)
    at net.js:441:14
    at process._tickCallback (node.js:442:13)
==== async task ====
WebDriver.createSession()
    at Function.webdriver.WebDriver.acquireSession_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:149:22)
    at Function.webdriver.WebDriver.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:123:30)
    at Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:294:22)
    at DriverProvider.getNewDriver (/usr/local/lib/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
    at Runner.createBrowser (/usr/local/lib/node_modules/protractor/lib/runner.js:180:37)
    at /usr/local/lib/node_modules/protractor/lib/runner.js:246:21
    at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:759:13)
[launcher] Process exited with error code 1

How can I launch webdriver-manager from my script or config file.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions