Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/drivers/BaseDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ abstract class BaseDriver {
await zapenable.click();
}
await wd.findElement(By.id('save')).click();
// Wait for the page to reload.
await new Promise((f) => {
setTimeout(f, 500);
});
await wd.close();
await this.selectLatestWindow(wd);
}
Expand Down
13 changes: 10 additions & 3 deletions test/drivers/ChromeDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ class ChromeDriver extends BaseDriver {

protected async createWebDriver(): Promise<WebDriver> {
const capabilities = Capabilities.chrome();
capabilities.set('webSocketUrl', true);
capabilities.set('goog:chromeOptions', {
args: [
// FIXME https://github.com/SeleniumHQ/selenium/issues/15788
`--disable-features=DisableLoadExtensionCommandLineSwitch`,
`--load-extension=${extensionPath.CHROME}-ext`,
// Needed to install the extension with BiDi.
'--enable-unsafe-extension-debugging',
'--remote-debugging-pipe',
'--headless=new',
],
prefs: {
Expand All @@ -61,6 +62,12 @@ class ChromeDriver extends BaseDriver {
.forBrowser(Browser.CHROME)
.withCapabilities(capabilities)
.build();
(await wd.getBidi()).send({
method: 'webExtension.install',
params: {
extensionData: {type: 'path', path: `${extensionPath.CHROME}-ext`},
},
});
return wd;
}
}
Expand Down