Skip to content

Commit

Permalink
Fix set JS using Bidi (#2103)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Mar 13, 2024
1 parent 08f4c13 commit 86aa797
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/firefox/webdriver/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { isAndroidConfigured, Android } from '../../android/index.js';
import { adjustVisualProgressTimestamps } from '../../support/util.js';
import { findFiles } from '../../support/fileUtil.js';
import { GeckoProfiler } from '../geckoProfiler.js';
import { FirefoxBidi } from '../firefoxBidi.js';
import { MemoryReport } from '../memoryReport.js';
import { PerfStats } from '../perfStats.js';
import { NetworkManager } from '../networkManager.js';
Expand Down Expand Up @@ -64,6 +65,13 @@ export class Firefox {
}

this.bidi = await runner.getDriver().getBidi();

this.browsertimeBidi = new FirefoxBidi(
await runner.getDriver().getBidi(),
this.windowId,
runner.getDriver(),
this.options
);
}

/**
Expand All @@ -82,7 +90,7 @@ export class Firefox {
*/
async beforeStartIteration(runner) {
if (this.options.injectJs) {
await this.bidi.injectJavaScript(this.options.injectJs);
await this.browsertimeBidi.injectJavaScript(this.options.injectJs);
}

if (
Expand Down

0 comments on commit 86aa797

Please sign in to comment.