Skip to content

Commit

Permalink
try to enable bidi
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Nov 25, 2024
1 parent 43ec32b commit 5d9bea7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/test/java/org/htmlunit/WebDriverTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,9 @@ protected WebDriver buildWebDriver() throws IOException {
final String locale = getBrowserVersion().getBrowserLocale().toLanguageTag();

final EdgeOptions options = new EdgeOptions();
// BiDi
options.setCapability("webSocketUrl", true);

options.addArguments("--lang=" + locale);
options.addArguments("--remote-allow-origins=*");

Expand Down Expand Up @@ -538,6 +541,9 @@ protected WebDriver buildWebDriver() throws IOException {
final String locale = getBrowserVersion().getBrowserLocale().toLanguageTag();

final ChromeOptions options = new ChromeOptions();
// BiDi
options.setCapability("webSocketUrl", true);

options.addArguments("--lang=" + locale);
options.addArguments("--remote-allow-origins=*");
options.addArguments("--disable-search-engine-choice-screen");
Expand Down Expand Up @@ -590,6 +596,9 @@ private FirefoxDriver createFirefoxDriver(final String geckodriverBinary, final
.build();

final FirefoxOptions options = new FirefoxOptions();
// BiDi
options.setCapability("webSocketUrl", true);

options.setBinary(binary);

String locale = getBrowserVersion().getBrowserLocale().toLanguageTag();
Expand Down Expand Up @@ -1168,7 +1177,6 @@ protected final WebDriver verifyTextArea2(final WebDriver driver,
}

protected final String getJsVariableValue(final WebDriver driver, final String varName) throws Exception {

final String script = "return String(" + varName + ")";
final String result = (String) ((JavascriptExecutor) driver).executeScript(script);

Expand Down

0 comments on commit 5d9bea7

Please sign in to comment.