Skip to content

Commit

Permalink
feat(edge): add Microsoft Edge support in CLI (#56)
Browse files Browse the repository at this point in the history
closes #55
  • Loading branch information
cnishina authored and heathkit committed Jun 23, 2016
1 parent 81c2aa3 commit 57372eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/cmds/opts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const STANDALONE = 'standalone';
export const CHROME = 'chrome';
export const IE = 'ie';
export const IE32 = 'ie32';
export const EDGE = 'edge';
export const ANDROID = 'android';
export const VERSIONS_CHROME = 'versions.chrome';
export const VERSIONS_STANDALONE = 'versions.standalone';
Expand Down Expand Up @@ -40,6 +41,7 @@ opts[STANDALONE] = new Option(STANDALONE, 'Install or update selenium standalone
opts[CHROME] = new Option(CHROME, 'Install or update chromedriver', 'boolean', ChromeDriver.isDefault);
opts[IE] = new Option(IE, 'Install or update ie driver', 'boolean', IEDriver.isDefault);
opts[IE32] = new Option(IE32, 'Install or update 32-bit ie driver', 'boolean', IEDriver.isDefault);
opts[EDGE] = new Option(EDGE, 'Use installed Microsoft Edge driver', 'string', 'C:\\Program Files (x86)\\Microsoft Web Driver\\MicrosoftWebDriver.exe');
opts[ANDROID] = new Option(ANDROID, 'Update/use the android sdk', 'boolean', AndroidSDK.isDefault);
opts[VERSIONS_CHROME] = new Option(VERSIONS_CHROME, 'Optional chrome driver version', 'string', ChromeDriver.versionDefault);
opts[VERSIONS_ANDROID] = new Option(VERSIONS_ANDROID, 'Optional android sdk version', 'string', AndroidSDK.versionDefault);
Expand Down
6 changes: 6 additions & 0 deletions lib/cmds/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ let prog = new Program()

if (os.type() === 'Windows_NT') {
prog.addOption(Opts[Opt.VERSIONS_IE]);
prog.addOption(Opts[Opt.EDGE]);
}

export var program = prog;
Expand Down Expand Up @@ -107,6 +108,11 @@ function start(options: Options) {
'-Dwebdriver.ie.driver=' +
path.join(outputDir, binaries[IEDriver.id].executableFilename(osType)));
}
if (options[Opt.EDGE]) {
args.push(
'-Dwebdriver.edge.driver=' +
options[Opt.EDGE].getString());
}
if (options[Opt.ANDROID].getBoolean()) {
if (downloadedBinaries[AndroidSDK.id] != null) {
let avds = options[Opt.AVDS].getString();
Expand Down

0 comments on commit 57372eb

Please sign in to comment.