Skip to content

Commit

Permalink
chore(types): temporarily fix types for direct connect
Browse files Browse the repository at this point in the history
  • Loading branch information
juliemr committed Dec 21, 2016
1 parent 60f309a commit 98b7f5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 8 additions & 3 deletions lib/driverProviders/direct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ export class Direct extends DriverProvider {
}

let chromeService = new ChromeServiceBuilder(chromeDriverFile).build();
driver = ChromeDriver.createSession(new Capabilities(this.config_.capabilities), chromeService);
// driver = ChromeDriver.createSession(new Capabilities(this.config_.capabilities),
// chromeService);
// TODO(ralphj): fix typings
driver = require('selenium-webdriver/chrome')
.Driver.createSession(
new Capabilities(this.config_.capabilities), chromeService);
break;
case 'firefox':
if (this.config_.firefoxPath) {
Expand All @@ -80,8 +85,8 @@ export class Direct extends DriverProvider {

// TODO(cnishina): Add in a service builder with marionette. Direct connect
// currently supports FF legacy version 47.
driver =
FirefoxDriver.createSession(new Capabilities(this.config_.capabilities));
driver = require('selenium-webdriver/firefox')
.Driver.createSession(new Capabilities(this.config_.capabilities));
break;
default:
throw new BrowserError(
Expand Down
5 changes: 2 additions & 3 deletions lib/driverProviders/driverProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ export abstract class DriverProvider {
getNewDriver() {
let builder: Builder;
if (this.config_.useBlockingProxy) {
builder = new Builder()
.usingServer(this.getBPUrl())
.withCapabilities(this.config_.capabilities);
builder =
new Builder().usingServer(this.getBPUrl()).withCapabilities(this.config_.capabilities);
} else {
builder = new Builder()
.usingServer(this.config_.seleniumAddress)
Expand Down

0 comments on commit 98b7f5e

Please sign in to comment.