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

Commit

Permalink
fix(jvmArgs): fixes jvmArgs launching selenium from config (#3698)
Browse files Browse the repository at this point in the history
closes #3697
  • Loading branch information
sptq authored and cnishina committed Nov 9, 2016
1 parent 21d534f commit f3938f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ export interface Config {
* seleniumArgs: ['-browserTimeout=60']
*/
args?: any;

/**
* Additional command line jvm options to pass to selenium. For example,
* if you need to change the browser driver, use
* jvmArgs: ['-Dwebdriver.ie.driver=IEDriverServer_Win32_2.53.1.exe']
*/
jvmArgs?: string[];
};
/**
* ChromeDriver location is used to help find the chromedriver binary.
Expand Down Expand Up @@ -588,6 +595,7 @@ export interface Config {
ng12Hybrid?: boolean;

seleniumArgs?: Array<any>;
jvmArgs?: string[];
configDir?: string;
troubleshoot?: boolean;
seleniumPort?: number;
Expand Down
5 changes: 4 additions & 1 deletion lib/driverProviders/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,16 @@ export class Local extends DriverProvider {
if (serverConf.args === undefined) {
serverConf.args = this.config_.seleniumArgs || [];
}
if (serverConf.jvmArgs === undefined) {
serverConf.jvmArgs = this.config_.jvmArgs || [];
}
if (serverConf.port === undefined) {
serverConf.port = this.config_.seleniumPort;
}

// configure server
if (this.config_.chromeDriver) {
serverConf.args.push('-Dwebdriver.chrome.driver=' + this.config_.chromeDriver);
serverConf.jvmArgs.push('-Dwebdriver.chrome.driver=' + this.config_.chromeDriver);
}

this.server_ = new remote.SeleniumServer(this.config_.seleniumServerJar, serverConf);
Expand Down

0 comments on commit f3938f9

Please sign in to comment.