Fix broken CI in FF155+
Some checks are pending
e2e / test (push) Waiting to run
lint / lint (mozilla) (push) Waiting to run
lint / lint (unit) (push) Waiting to run
lint / commit-emails (push) Waiting to run
lint / lint (lint) (push) Waiting to run
Website / build (push) Waiting to run
Website / deploy (push) Blocked by required conditions

Flag needed to use Selenium ExecuteScript on WebExtension pages
This commit is contained in:
Oliver Blanthorn 2026-09-07 17:11:58 +02:00
parent c2e6452a46
commit 11693da62e
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -3,7 +3,7 @@ import * as path from "path"
import * as os from "os"
import * as process from "process"
import { Browser, Builder, By, Key, WebDriver } from "selenium-webdriver"
import { Driver, Options } from "selenium-webdriver/firefox"
import { Driver, Options, ServiceBuilder } from "selenium-webdriver/firefox"
import * as Until from "selenium-webdriver/lib/until"
const env = process.env
const drivers = new Set<Driver>()
@ -48,6 +48,8 @@ export async function getDriver() {
const driver = new Builder()
.forBrowser(Browser.FIREFOX)
.setFirefoxOptions(options)
// Required to evaluate scripts in extension pages; only for test browsers.
.setFirefoxService(new ServiceBuilder().addArguments("--allow-system-access"))
.build() as unknown as Driver
drivers.add(driver)