Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Fix for chrome service failing for multi remote #7055 (#58)
Browse files Browse the repository at this point in the history
* Fix for chrome service failing for multi remote #7055

* Update launcher.js

used logical AND  operation

* Added unit tests
  • Loading branch information
praveendvd committed Jun 25, 2021
1 parent 9cdcf11 commit 1d90ee8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const DEFAULT_CONNECTION = {
}

const isMultiremote = obj => typeof obj === 'object' && !Array.isArray(obj)
const isChrome = cap => cap.browserName.toLowerCase() === 'chrome'
const isChrome = cap => cap.browserName && cap.browserName.toLowerCase() === 'chrome'

export default class ChromeDriverLauncher {
constructor(options, capabilities, config) {
Expand Down Expand Up @@ -79,7 +79,7 @@ export default class ChromeDriverLauncher {
process.on('uncaughtException', this.onComplete.bind(this))
}

onComplete () {
onComplete() {
if (this.process) {
this.process.kill()
}
Expand Down
10 changes: 10 additions & 0 deletions tests/launcher.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ describe('ChromeDriverLauncher launcher', () => {
capabilities: {
browserName: 'firefox'
}
},
myCustomAppium: {
capabilities: {
'platformName': 'android',
}
}
}
})
Expand Down Expand Up @@ -200,6 +205,11 @@ describe('ChromeDriverLauncher launcher', () => {
capabilities: {
browserName: 'firefox'
}
},
myCustomAppium: {
capabilities: {
'platformName': 'android',
}
}
})
})
Expand Down

0 comments on commit 1d90ee8

Please sign in to comment.