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

Commit e3ee71c

Browse files
committed
chore(types): temporarily fix types for direct connect
1 parent edc3383 commit e3ee71c

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
@@ -68,7 +68,12 @@ export class Direct extends DriverProvider {
6868
}
6969

7070
let chromeService = new ChromeServiceBuilder(chromeDriverFile).build();
71-
driver = ChromeDriver.createSession(new Capabilities(this.config_.capabilities), chromeService);
71+
// driver = ChromeDriver.createSession(new Capabilities(this.config_.capabilities),
72+
// chromeService);
73+
// TODO(ralphj): fix typings
74+
driver = require('selenium-webdriver/chrome')
75+
.Driver.createSession(
76+
new Capabilities(this.config_.capabilities), chromeService);
7277
break;
7378
case 'firefox':
7479
if (this.config_.firefoxPath) {
@@ -77,8 +82,8 @@ export class Direct extends DriverProvider {
7782

7883
// TODO(cnishina): Add in a service builder with marionette. Direct connect
7984
// currently supports FF legacy version 47.
80-
driver =
81-
FirefoxDriver.createSession(new Capabilities(this.config_.capabilities));
85+
driver = require('selenium-webdriver/firefox')
86+
.Driver.createSession(new Capabilities(this.config_.capabilities));
8287
break;
8388
default:
8489
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)