From a641d7dd23bfa9ca8a322e4b118f7f65aaf07bb5 Mon Sep 17 00:00:00 2001 From: Burak Kaygusuz Date: Tue, 12 Nov 2024 10:58:33 +0300 Subject: [PATCH] Enable BiDi --- .../java/io/github/burakkaygusuz/config/Browser.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/burakkaygusuz/config/Browser.java b/src/main/java/io/github/burakkaygusuz/config/Browser.java index 5e6130f..73a6bd7 100644 --- a/src/main/java/io/github/burakkaygusuz/config/Browser.java +++ b/src/main/java/io/github/burakkaygusuz/config/Browser.java @@ -24,6 +24,7 @@ protected ChromeOptions getOptions() { final ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions + .enableBiDi() .setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation")) .setExperimentalOption("prefs", prefs) .addArguments("--disable-gpu", "--disable-logging", "--disable-dev-shm-usage") @@ -40,7 +41,9 @@ protected FirefoxOptions getOptions() { firefoxProfile.setAcceptUntrustedCertificates(true); firefoxProfile.setAssumeUntrustedCertificateIssuer(true); - firefoxOptions.addPreference("dom.webnotifications.enabled", false) + firefoxOptions + .enableBiDi() + .addPreference("dom.webnotifications.enabled", false) .addPreference("gfx.direct2d.disabled", true) .addPreference("layers.acceleration.force-enabled", true) .addPreference("javascript.enabled", true) @@ -59,7 +62,9 @@ protected EdgeOptions getOptions() { prefs.put("profile.password_manager_enabled", false); final EdgeOptions edgeOptions = new EdgeOptions(); - edgeOptions.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation")) + edgeOptions + .enableBiDi() + .setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation")) .setExperimentalOption("prefs", prefs) .addArguments("--disable-gpu", "--disable-logging", "--disable-dev-shm-usage") .setPageLoadStrategy(PageLoadStrategy.NORMAL)