Adam Labi
Adam Labi

Reputation: 444

Using an absolute path when setting the webdriver for Internet Explorer in Protractor on Windows

I am trying to run automated tests using Protractor. my protractor.cong.js file is as follows.

exports.config = {
specs: ['tests/**/*.test.js'],
params: {
    colors: false
},
multiCapabilities: [
    { 'browserName': 'firefox', 'proxy': { 'proxyType': 'autodetect'} },
    { 'browserName': 'chrome' },
    { 'browserName': 'internet explorer', 'ignoreProtectedModeSettings': true }
],
seleniumArgs: ['-Dwebdriver.ie.driver=node_modules\grunt-protractor-runner\node_modules\protractor\selenium\IEDriverServer.exe']

}

This all works well and good but I would much prefer if the path for the webdriver was absolute rather than relative. For example:

seleniumArgs: ['-Dwebdriver.ie.driver=C:\Selenium\IEDriverServer.exe']

Is this possible? I have checked the wiki but it has not offered a solution.

Upvotes: 0

Views: 434

Answers (1)

Adam Labi
Adam Labi

Reputation: 444

the problem was that I was trying to use window style paths or unix style paths rather than an amalgimation of the two. the correct way to write it is:

seleniumArgs: ['-Dwebdriver.ie.driver=C:/Selenium/IEDriverServer.exe']

NOT

seleniumArgs: ['-Dwebdriver.ie.driver=C:\Selenium\IEDriverServer.exe']

(the slashes are the other way round)

Upvotes: 2

Related Questions