Skip to content

Commit dc62d24

Browse files
authored
[bidi][java] Enable Edge BiDi tests (#13780)
1 parent b800dfc commit dc62d24

20 files changed

+17
-124
lines changed

java/src/org/openqa/selenium/edge/EdgeDriverInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public boolean isSupportingCdp() {
6363

6464
@Override
6565
public boolean isSupportingBiDi() {
66-
return false;
66+
return true;
6767
}
6868

6969
@Override

java/test/org/openqa/selenium/bidi/browser/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ java_selenium_test_suite(
77
srcs = glob(["*Test.java"]),
88
browsers = [
99
"chrome",
10+
"edge",
1011
"firefox",
1112
],
1213
tags = [

java/test/org/openqa/selenium/bidi/browser/BrowserCommandsTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919

2020
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
2121
import static org.openqa.selenium.testing.Safely.safelyCall;
22-
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
23-
import static org.openqa.selenium.testing.drivers.Browser.IE;
24-
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
22+
import static org.openqa.selenium.testing.drivers.Browser.*;
2523

2624
import java.util.List;
2725
import org.junit.jupiter.api.AfterEach;

java/test/org/openqa/selenium/bidi/browsingcontext/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ java_selenium_test_suite(
77
srcs = glob(["*Test.java"]),
88
browsers = [
99
"chrome",
10+
"edge",
1011
"firefox",
1112
],
1213
tags = [

java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextInspectorTest.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@
1919

2020
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
2121
import static org.openqa.selenium.testing.Safely.safelyCall;
22-
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
23-
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
24-
import static org.openqa.selenium.testing.drivers.Browser.IE;
25-
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
22+
import static org.openqa.selenium.testing.drivers.Browser.*;
2623

2724
import java.util.concurrent.CompletableFuture;
2825
import java.util.concurrent.ExecutionException;
@@ -52,7 +49,6 @@ public void setUp() {
5249
@Test
5350
@NotYetImplemented(SAFARI)
5451
@NotYetImplemented(IE)
55-
@NotYetImplemented(EDGE)
5652
void canListenToWindowBrowsingContextCreatedEvent()
5753
throws ExecutionException, InterruptedException, TimeoutException {
5854
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
@@ -75,7 +71,6 @@ void canListenToWindowBrowsingContextCreatedEvent()
7571
@Test
7672
@NotYetImplemented(SAFARI)
7773
@NotYetImplemented(IE)
78-
@NotYetImplemented(EDGE)
7974
void canListenToBrowsingContextDestroyedEvent()
8075
throws ExecutionException, InterruptedException, TimeoutException {
8176
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
@@ -99,7 +94,6 @@ void canListenToBrowsingContextDestroyedEvent()
9994
@Test
10095
@NotYetImplemented(SAFARI)
10196
@NotYetImplemented(IE)
102-
@NotYetImplemented(EDGE)
10397
void canListenToTabBrowsingContextCreatedEvent()
10498
throws ExecutionException, InterruptedException, TimeoutException {
10599
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
@@ -121,7 +115,6 @@ void canListenToTabBrowsingContextCreatedEvent()
121115
@Test
122116
@NotYetImplemented(SAFARI)
123117
@NotYetImplemented(IE)
124-
@NotYetImplemented(EDGE)
125118
void canListenToDomContentLoadedEvent()
126119
throws ExecutionException, InterruptedException, TimeoutException {
127120
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
@@ -140,7 +133,6 @@ void canListenToDomContentLoadedEvent()
140133
@Test
141134
@NotYetImplemented(SAFARI)
142135
@NotYetImplemented(IE)
143-
@NotYetImplemented(EDGE)
144136
void canListenToBrowsingContextLoadedEvent()
145137
throws ExecutionException, InterruptedException, TimeoutException {
146138
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
@@ -179,7 +171,6 @@ void canListenToNavigationStartedEvent()
179171
@Test
180172
@NotYetImplemented(SAFARI)
181173
@NotYetImplemented(IE)
182-
@NotYetImplemented(EDGE)
183174
void canListenToFragmentNavigatedEvent()
184175
throws ExecutionException, InterruptedException, TimeoutException {
185176
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
@@ -202,7 +193,6 @@ void canListenToFragmentNavigatedEvent()
202193
@Test
203194
@NotYetImplemented(SAFARI)
204195
@NotYetImplemented(IE)
205-
@NotYetImplemented(EDGE)
206196
void canListenToUserPromptOpenedEvent()
207197
throws ExecutionException, InterruptedException, TimeoutException {
208198
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
@@ -224,7 +214,8 @@ void canListenToUserPromptOpenedEvent()
224214
@Test
225215
@NotYetImplemented(SAFARI)
226216
@NotYetImplemented(IE)
227-
@NotYetImplemented(EDGE)
217+
// TODO: This test is flaky for comparing the browsing context id for Chrome and Edge. Fix flaky
218+
// test.
228219
void canListenToUserPromptClosedEvent()
229220
throws ExecutionException, InterruptedException, TimeoutException {
230221
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {

java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
2424
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOfElementLocated;
2525
import static org.openqa.selenium.testing.Safely.safelyCall;
26-
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
2726
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
2827
import static org.openqa.selenium.testing.drivers.Browser.IE;
2928
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
@@ -76,7 +75,6 @@ void canCreateAWindow() {
7675
@Test
7776
@NotYetImplemented(SAFARI)
7877
@NotYetImplemented(IE)
79-
@NotYetImplemented(EDGE)
8078
void canCreateAWindowWithAReferenceContext() {
8179
BrowsingContext browsingContext =
8280
new BrowsingContext(driver, WindowType.WINDOW, driver.getWindowHandle());
@@ -94,7 +92,6 @@ void canCreateATab() {
9492
@Test
9593
@NotYetImplemented(SAFARI)
9694
@NotYetImplemented(IE)
97-
@NotYetImplemented(EDGE)
9895
void canCreateATabWithAReferenceContext() {
9996
BrowsingContext browsingContext =
10097
new BrowsingContext(driver, WindowType.TAB, driver.getWindowHandle());
@@ -130,7 +127,6 @@ void canNavigateToAUrlWithReadinessState() {
130127
@Test
131128
@NotYetImplemented(SAFARI)
132129
@NotYetImplemented(IE)
133-
@NotYetImplemented(EDGE)
134130
void canGetTreeWithAChild() {
135131
String referenceContextId = driver.getWindowHandle();
136132
BrowsingContext parentWindow = new BrowsingContext(driver, referenceContextId);
@@ -151,7 +147,6 @@ void canGetTreeWithAChild() {
151147
@Test
152148
@NotYetImplemented(SAFARI)
153149
@NotYetImplemented(IE)
154-
@NotYetImplemented(EDGE)
155150
void canGetTreeWithDepth() {
156151
String referenceContextId = driver.getWindowHandle();
157152
BrowsingContext parentWindow = new BrowsingContext(driver, referenceContextId);

java/test/org/openqa/selenium/bidi/input/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ java_selenium_test_suite(
77
srcs = glob(["*Test.java"]),
88
browsers = [
99
"chrome",
10+
"edge",
1011
"firefox",
1112
],
1213
data = [

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

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@
2626
import static org.openqa.selenium.testing.TestUtilities.getEffectivePlatform;
2727
import static org.openqa.selenium.testing.TestUtilities.getIEVersion;
2828
import static org.openqa.selenium.testing.TestUtilities.isInternetExplorer;
29-
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
30-
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
31-
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
32-
import static org.openqa.selenium.testing.drivers.Browser.IE;
33-
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
29+
import static org.openqa.selenium.testing.drivers.Browser.*;
3430

3531
import java.util.ArrayList;
3632
import java.util.List;
@@ -72,7 +68,6 @@ public void setUp() {
7268
@Test
7369
@NotYetImplemented(SAFARI)
7470
@NotYetImplemented(IE)
75-
@NotYetImplemented(EDGE)
7671
public void testPlainClickingOnMultiSelectionList() {
7772
driver.get(pages.formSelectionPage);
7873

@@ -96,7 +91,6 @@ public void testPlainClickingOnMultiSelectionList() {
9691
@Test
9792
@NotYetImplemented(SAFARI)
9893
@NotYetImplemented(IE)
99-
@NotYetImplemented(EDGE)
10094
public void testShiftClickingOnMultiSelectionList() {
10195
driver.get(pages.formSelectionPage);
10296

@@ -120,7 +114,6 @@ public void testShiftClickingOnMultiSelectionList() {
120114
@Test
121115
@NotYetImplemented(SAFARI)
122116
@NotYetImplemented(IE)
123-
@NotYetImplemented(EDGE)
124117
@NotYetImplemented(FIREFOX)
125118
public void testMultipleInputs() {
126119
driver.get(pages.formSelectionPage);
@@ -152,7 +145,6 @@ public void testMultipleInputs() {
152145
@Test
153146
@NotYetImplemented(SAFARI)
154147
@NotYetImplemented(IE)
155-
@NotYetImplemented(EDGE)
156148
public void testControlClickingOnMultiSelectionList() {
157149
assumeFalse(
158150
getEffectivePlatform(driver).is(Platform.MAC), "FIXME: macs don't have CONTROL key");
@@ -182,7 +174,6 @@ public void testControlClickingOnMultiSelectionList() {
182174
@Test
183175
@NotYetImplemented(SAFARI)
184176
@NotYetImplemented(IE)
185-
@NotYetImplemented(EDGE)
186177
public void testControlClickingOnCustomMultiSelectionList() {
187178
driver.get(pages.selectableItemsPage);
188179
Keys key = getEffectivePlatform(driver).is(Platform.MAC) ? Keys.COMMAND : Keys.CONTROL;
@@ -215,7 +206,6 @@ public void testControlClickingOnCustomMultiSelectionList() {
215206
@Test
216207
@NotYetImplemented(SAFARI)
217208
@NotYetImplemented(IE)
218-
@NotYetImplemented(EDGE)
219209
@NotYetImplemented(FIREFOX)
220210
public void testControlClickingWithMultiplePointers() {
221211
driver.get(pages.selectableItemsPage);
@@ -302,15 +292,13 @@ void canMoveMouseToAnElementInAnIframeAndClick() {
302292
@Test
303293
@NotYetImplemented(SAFARI)
304294
@NotYetImplemented(IE)
305-
@NotYetImplemented(EDGE)
306295
void testCanClickOnLinks() {
307296
navigateToClicksPageAndClickLink();
308297
}
309298

310299
@Test
311300
@NotYetImplemented(SAFARI)
312301
@NotYetImplemented(IE)
313-
@NotYetImplemented(EDGE)
314302
public void testCanClickOnLinksWithAnOffset() {
315303
driver.get(pages.clicksPage);
316304

@@ -326,7 +314,6 @@ public void testCanClickOnLinksWithAnOffset() {
326314
@Test
327315
@NotYetImplemented(SAFARI)
328316
@NotYetImplemented(IE)
329-
@NotYetImplemented(EDGE)
330317
public void testClickAfterMoveToAnElementWithAnOffsetShouldUseLastMousePosition() {
331318
driver.get(pages.clickEventPage);
332319

@@ -370,7 +357,6 @@ private boolean fuzzyPositionMatching(int expectedX, int expectedY, int actualX,
370357
@Test
371358
@NotYetImplemented(SAFARI)
372359
@NotYetImplemented(IE)
373-
@NotYetImplemented(EDGE)
374360
public void testMouseMovementWorksWhenNavigatingToAnotherPage() {
375361
navigateToClicksPageAndClickLink();
376362

@@ -384,8 +370,8 @@ public void testMouseMovementWorksWhenNavigatingToAnotherPage() {
384370
@Test
385371
@NotYetImplemented(SAFARI)
386372
@NotYetImplemented(IE)
387-
@NotYetImplemented(EDGE)
388373
@NotYetImplemented(CHROME)
374+
@NotYetImplemented(EDGE)
389375
@NotYetImplemented(FIREFOX)
390376
public void testChordControlCutAndPaste() {
391377
assumeFalse(
@@ -425,7 +411,6 @@ public void testChordControlCutAndPaste() {
425411
@Test
426412
@NotYetImplemented(SAFARI)
427413
@NotYetImplemented(IE)
428-
@NotYetImplemented(EDGE)
429414
public void testCombiningShiftAndClickResultsInANewWindow() {
430415
driver.get(pages.linkedImage);
431416
WebElement link = driver.findElement(By.id("link"));
@@ -451,7 +436,6 @@ public void testCombiningShiftAndClickResultsInANewWindow() {
451436
@Test
452437
@NotYetImplemented(SAFARI)
453438
@NotYetImplemented(IE)
454-
@NotYetImplemented(EDGE)
455439
public void testHoldingDownShiftKeyWhileClicking() {
456440
driver.get(pages.clickEventPage);
457441

@@ -468,7 +452,6 @@ public void testHoldingDownShiftKeyWhileClicking() {
468452
@Test
469453
@NotYetImplemented(SAFARI)
470454
@NotYetImplemented(IE)
471-
@NotYetImplemented(EDGE)
472455
public void canClickOnASuckerFishStyleMenu() throws InterruptedException {
473456
driver.get(pages.javascriptPage);
474457

@@ -496,7 +479,6 @@ public void canClickOnASuckerFishStyleMenu() throws InterruptedException {
496479
@Test
497480
@NotYetImplemented(SAFARI)
498481
@NotYetImplemented(IE)
499-
@NotYetImplemented(EDGE)
500482
void testCanClickOnSuckerFishMenuItem() {
501483
driver.get(pages.javascriptPage);
502484

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static org.assertj.core.api.Assertions.assertThat;
2121
import static org.junit.jupiter.api.Assumptions.assumeFalse;
2222
import static org.openqa.selenium.testing.TestUtilities.getEffectivePlatform;
23-
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
2423
import static org.openqa.selenium.testing.drivers.Browser.IE;
2524
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
2625

@@ -60,7 +59,6 @@ private Actions getBuilder(WebDriver driver) {
6059
@Test
6160
@NotYetImplemented(SAFARI)
6261
@NotYetImplemented(IE)
63-
@NotYetImplemented(EDGE)
6462
void testBasicKeyboardInput() {
6563
driver.get(appServer.whereIs("single_text_input.html"));
6664

@@ -76,7 +74,6 @@ void testBasicKeyboardInput() {
7674
@Test
7775
@NotYetImplemented(SAFARI)
7876
@NotYetImplemented(IE)
79-
@NotYetImplemented(EDGE)
8077
@NotYetImplemented(SAFARI)
8178
public void testSendingKeyDownOnly() {
8279
driver.get(appServer.whereIs("key_logger.html"));
@@ -99,7 +96,6 @@ public void testSendingKeyDownOnly() {
9996
@Test
10097
@NotYetImplemented(SAFARI)
10198
@NotYetImplemented(IE)
102-
@NotYetImplemented(EDGE)
10399
@NotYetImplemented(SAFARI)
104100
public void testSendingKeyUp() {
105101
driver.get(appServer.whereIs("key_logger.html"));
@@ -128,7 +124,6 @@ public void testSendingKeyUp() {
128124
@Test
129125
@NotYetImplemented(SAFARI)
130126
@NotYetImplemented(IE)
131-
@NotYetImplemented(EDGE)
132127
@NotYetImplemented(SAFARI)
133128
public void testSendingKeysWithShiftPressed() {
134129
driver.get(pages.javascriptPage);
@@ -157,7 +152,6 @@ public void testSendingKeysWithShiftPressed() {
157152
@Test
158153
@NotYetImplemented(SAFARI)
159154
@NotYetImplemented(IE)
160-
@NotYetImplemented(EDGE)
161155
@NotYetImplemented(value = SAFARI, reason = "getText does not normalize spaces")
162156
public void testSendingKeysToActiveElement() {
163157
driver.get(pages.bodyTypingPage);
@@ -171,7 +165,6 @@ public void testSendingKeysToActiveElement() {
171165
@Test
172166
@NotYetImplemented(SAFARI)
173167
@NotYetImplemented(IE)
174-
@NotYetImplemented(EDGE)
175168
@NotYetImplemented(SAFARI)
176169
public void testBasicKeyboardInputOnActiveElement() {
177170
driver.get(pages.javascriptPage);
@@ -188,7 +181,6 @@ public void testBasicKeyboardInputOnActiveElement() {
188181
@Test
189182
@NotYetImplemented(SAFARI)
190183
@NotYetImplemented(IE)
191-
@NotYetImplemented(EDGE)
192184
void canGenerateKeyboardShortcuts() {
193185
driver.get(appServer.whereIs("keyboard_shortcut.html"));
194186

@@ -220,7 +212,6 @@ void canGenerateKeyboardShortcuts() {
220212
@Test
221213
@NotYetImplemented(SAFARI)
222214
@NotYetImplemented(IE)
223-
@NotYetImplemented(EDGE)
224215
public void testSelectionSelectBySymbol() {
225216
driver.get(appServer.whereIs("single_text_input.html"));
226217

@@ -248,7 +239,6 @@ public void testSelectionSelectBySymbol() {
248239
@Test
249240
@NotYetImplemented(SAFARI)
250241
@NotYetImplemented(IE)
251-
@NotYetImplemented(EDGE)
252242
@Ignore(IE)
253243
public void testSelectionSelectByWord() {
254244
assumeFalse(getEffectivePlatform(driver).is(Platform.MAC), "MacOS has alternative keyboard");
@@ -279,7 +269,6 @@ public void testSelectionSelectByWord() {
279269
@Test
280270
@NotYetImplemented(SAFARI)
281271
@NotYetImplemented(IE)
282-
@NotYetImplemented(EDGE)
283272
void testSelectionSelectAll() {
284273
assumeFalse(getEffectivePlatform(driver).is(Platform.MAC), "MacOS has alternative keyboard");
285274

0 commit comments

Comments
 (0)