diff --git a/lib/firefox/webdriver/firefox.js b/lib/firefox/webdriver/firefox.js index a9db0bf1a..1a0e811d9 100644 --- a/lib/firefox/webdriver/firefox.js +++ b/lib/firefox/webdriver/firefox.js @@ -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'; @@ -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 + ); } /** @@ -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 (