Skip to content

Commit abfe72a

Browse files
authored
Merge branch 'trunk' into syber911911-feature-branch
2 parents 0cfe615 + 44cf4a4 commit abfe72a

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

java/test/org/openqa/selenium/bidi/input/DefaultKeyboardTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,19 @@ void canGenerateKeyboardShortcuts() {
201201
@NotYetImplemented(
202202
value = EDGE,
203203
reason = "https://github.com/GoogleChromeLabs/chromium-bidi/issues/2321")
204-
public void testSelectionSelectBySymbol() {
204+
public void testSelectionSelectBySymbol() throws InterruptedException {
205205
driver.get(appServer.whereIs("single_text_input.html"));
206206

207207
WebElement input = driver.findElement(By.id("textInput"));
208208

209209
inputModule.perform(
210210
windowHandle, getBuilder(driver).click(input).sendKeys("abc def").getSequences());
211211

212+
// TODO: The wait until condition does not wait for the attribute.
213+
// Hence this is required.
214+
// Not an ideal fix but it needs to be triaged further.
215+
Thread.sleep(5000);
216+
212217
shortWait.until(ExpectedConditions.attributeToBe(input, "value", "abc def"));
213218

214219
inputModule.perform(

java/test/org/openqa/selenium/testing/drivers/Browser.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.openqa.selenium.testing.drivers;
1919

2020
import static org.openqa.selenium.remote.CapabilityType.BROWSER_NAME;
21+
import static org.openqa.selenium.remote.CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR;
2122

2223
import java.util.HashMap;
2324
import java.util.Map;
@@ -61,6 +62,9 @@ public Capabilities getCapabilities() {
6162

6263
options.enableBiDi();
6364

65+
// Reason: https://github.com/SeleniumHQ/selenium/pull/14429#issuecomment-2311614822
66+
options.setCapability(UNHANDLED_PROMPT_BEHAVIOUR, "ignore");
67+
6468
return options;
6569
}
6670
},
@@ -91,6 +95,7 @@ public Capabilities getCapabilities() {
9195
options.setExperimentalOption("prefs", prefs);
9296

9397
options.enableBiDi();
98+
options.setCapability(UNHANDLED_PROMPT_BEHAVIOUR, "ignore");
9499

95100
return options;
96101
}

javascript/node/selenium-webdriver/bidi/browsingContextInspector.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ class BrowsingContextInspector {
127127
let response = null
128128
if ('navigation' in params) {
129129
response = new NavigationInfo(params.context, params.navigation, params.timestamp, params.url)
130-
} else if ('type' in params) {
131-
response = new UserPromptOpened(params.context, params.type, params.message)
132130
} else if ('accepted' in params) {
133131
response = new UserPromptClosed(params.context, params.accepted, params.userText)
132+
} else if ('type' in params) {
133+
response = new UserPromptOpened(params.context, params.type, params.message)
134134
} else {
135135
response = new BrowsingContextInfo(params.context, params.url, params.children, params.parent)
136136
}

javascript/node/selenium-webdriver/testing/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ class Environment {
346346
// Enable BiDi for supporting browsers.
347347
if (browser.name === Browser.FIREFOX || browser.name === Browser.CHROME || browser.name === Browser.EDGE) {
348348
builder.setCapability('webSocketUrl', true)
349+
builder.setCapability('unhandledPromptBehavior', 'ignore')
349350
}
350351

351352
if (typeof urlOrServer === 'string') {

0 commit comments

Comments
 (0)