Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibillity to customize port where IEDriverServer is listening #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ Type: `Boolean`

Default: `false`

### port
Port number where IEDriver will listen. Default is 5555.

Type: `String`

----

For more information on WebdriverIO see the [homepage](http://webdriver.io).
4 changes: 3 additions & 1 deletion lib/launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ class IEDriverLauncher {
this.ieDriverArgs = {}
this.logToStdout = false
this.killInstances = false
this.port = null;
}

onPrepare (config) {
this.ieDriverArgs = config.ieDriverArgs || {}
this.ieDriverLogs = config.ieDriverLogs
this.logToStdout = config.logToStdout
this.killInstances = config.killInstances
this.port = (config.port == undefined || config.port == null) ? '5555' : config.port;

return new Promise((resolve, reject) => {
this.process = childProcess.execFile(binPath, [], (err, stdout, stderr) => {
this.process = childProcess.execFile(binPath, ['--port=' + _this.port], (err, stdout, stderr) => {
if (err) {
console.log('Error in process: ' + err)
return reject(err)
Expand Down