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

Commit 7827e39

Browse files
committed
chore(types): temporarily fix types for direct connect
1 parent 0e26b21 commit 7827e39

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

lib/driverProviders/direct.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ export class Direct extends DriverProvider {
7171
}
7272

7373
let chromeService = new ChromeServiceBuilder(chromeDriverFile).build();
74-
driver = ChromeDriver.createSession(new Capabilities(this.config_.capabilities), chromeService);
74+
// driver = ChromeDriver.createSession(new Capabilities(this.config_.capabilities),
75+
// chromeService);
76+
// TODO(ralphj): fix typings
77+
driver = require('selenium-webdriver/chrome')
78+
.Driver.createSession(
79+
new Capabilities(this.config_.capabilities), chromeService);
7580
break;
7681
case 'firefox':
7782
if (this.config_.firefoxPath) {
@@ -80,8 +85,8 @@ export class Direct extends DriverProvider {
8085

8186
// TODO(cnishina): Add in a service builder with marionette. Direct connect
8287
// currently supports FF legacy version 47.
83-
driver =
84-
FirefoxDriver.createSession(new Capabilities(this.config_.capabilities));
88+
driver = require('selenium-webdriver/firefox')
89+
.Driver.createSession(new Capabilities(this.config_.capabilities));
8590
break;
8691
default:
8792
throw new BrowserError(

lib/driverProviders/driverProvider.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ export abstract class DriverProvider {
4343
getNewDriver() {
4444
let builder: Builder;
4545
if (this.config_.useBlockingProxy) {
46-
builder = new Builder()
47-
.usingServer(this.getBPUrl())
48-
.withCapabilities(this.config_.capabilities);
46+
builder =
47+
new Builder().usingServer(this.getBPUrl()).withCapabilities(this.config_.capabilities);
4948
} else {
5049
builder = new Builder()
5150
.usingServer(this.config_.seleniumAddress)

0 commit comments

Comments
 (0)