Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bidi][java] Enable Edge BiDi tests #13780

Merged
merged 10 commits into from
Apr 8, 2024
2 changes: 1 addition & 1 deletion java/src/org/openqa/selenium/edge/EdgeDriverInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public boolean isSupportingCdp() {

@Override
public boolean isSupportingBiDi() {
return false;
return true;
}

@Override
Expand Down
1 change: 1 addition & 0 deletions java/test/org/openqa/selenium/bidi/browser/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ java_selenium_test_suite(
srcs = glob(["*Test.java"]),
browsers = [
"chrome",
"edge",
"firefox",
],
tags = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.openqa.selenium.testing.Safely.safelyCall;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.IE;
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
import static org.openqa.selenium.testing.drivers.Browser.*;

import java.util.List;
import org.junit.jupiter.api.AfterEach;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ java_selenium_test_suite(
srcs = glob(["*Test.java"]),
browsers = [
"chrome",
"edge",
"firefox",
],
tags = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.openqa.selenium.testing.Safely.safelyCall;
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.IE;
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
import static org.openqa.selenium.testing.drivers.Browser.*;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
Expand Down Expand Up @@ -52,7 +49,6 @@ public void setUp() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canListenToWindowBrowsingContextCreatedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
Expand All @@ -75,7 +71,6 @@ void canListenToWindowBrowsingContextCreatedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canListenToBrowsingContextDestroyedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
Expand All @@ -99,7 +94,6 @@ void canListenToBrowsingContextDestroyedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canListenToTabBrowsingContextCreatedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
Expand All @@ -121,7 +115,6 @@ void canListenToTabBrowsingContextCreatedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canListenToDomContentLoadedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
Expand All @@ -140,7 +133,6 @@ void canListenToDomContentLoadedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canListenToBrowsingContextLoadedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
Expand Down Expand Up @@ -179,7 +171,6 @@ void canListenToNavigationStartedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canListenToFragmentNavigatedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
Expand All @@ -202,7 +193,6 @@ void canListenToFragmentNavigatedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canListenToUserPromptOpenedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
Expand All @@ -224,7 +214,8 @@ void canListenToUserPromptOpenedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
// TODO: This test is flaky for comparing the browsing context id for Chrome and Edge. Fix flaky
// test.
void canListenToUserPromptClosedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOfElementLocated;
import static org.openqa.selenium.testing.Safely.safelyCall;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
import static org.openqa.selenium.testing.drivers.Browser.IE;
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
Expand Down Expand Up @@ -76,7 +75,6 @@ void canCreateAWindow() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canCreateAWindowWithAReferenceContext() {
BrowsingContext browsingContext =
new BrowsingContext(driver, WindowType.WINDOW, driver.getWindowHandle());
Expand All @@ -94,7 +92,6 @@ void canCreateATab() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canCreateATabWithAReferenceContext() {
BrowsingContext browsingContext =
new BrowsingContext(driver, WindowType.TAB, driver.getWindowHandle());
Expand Down Expand Up @@ -130,7 +127,6 @@ void canNavigateToAUrlWithReadinessState() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canGetTreeWithAChild() {
String referenceContextId = driver.getWindowHandle();
BrowsingContext parentWindow = new BrowsingContext(driver, referenceContextId);
Expand All @@ -151,7 +147,6 @@ void canGetTreeWithAChild() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canGetTreeWithDepth() {
String referenceContextId = driver.getWindowHandle();
BrowsingContext parentWindow = new BrowsingContext(driver, referenceContextId);
Expand Down
1 change: 1 addition & 0 deletions java/test/org/openqa/selenium/bidi/input/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ java_selenium_test_suite(
srcs = glob(["*Test.java"]),
browsers = [
"chrome",
"edge",
"firefox",
],
data = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
import static org.openqa.selenium.testing.TestUtilities.getEffectivePlatform;
import static org.openqa.selenium.testing.TestUtilities.getIEVersion;
import static org.openqa.selenium.testing.TestUtilities.isInternetExplorer;
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
import static org.openqa.selenium.testing.drivers.Browser.IE;
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
import static org.openqa.selenium.testing.drivers.Browser.*;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -72,7 +68,6 @@ public void setUp() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
public void testPlainClickingOnMultiSelectionList() {
driver.get(pages.formSelectionPage);

Expand All @@ -96,7 +91,6 @@ public void testPlainClickingOnMultiSelectionList() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
public void testShiftClickingOnMultiSelectionList() {
driver.get(pages.formSelectionPage);

Expand All @@ -120,7 +114,6 @@ public void testShiftClickingOnMultiSelectionList() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
@NotYetImplemented(FIREFOX)
public void testMultipleInputs() {
driver.get(pages.formSelectionPage);
Expand Down Expand Up @@ -152,7 +145,6 @@ public void testMultipleInputs() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
public void testControlClickingOnMultiSelectionList() {
assumeFalse(
getEffectivePlatform(driver).is(Platform.MAC), "FIXME: macs don't have CONTROL key");
Expand Down Expand Up @@ -182,7 +174,6 @@ public void testControlClickingOnMultiSelectionList() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
public void testControlClickingOnCustomMultiSelectionList() {
driver.get(pages.selectableItemsPage);
Keys key = getEffectivePlatform(driver).is(Platform.MAC) ? Keys.COMMAND : Keys.CONTROL;
Expand Down Expand Up @@ -215,7 +206,6 @@ public void testControlClickingOnCustomMultiSelectionList() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
@NotYetImplemented(FIREFOX)
public void testControlClickingWithMultiplePointers() {
driver.get(pages.selectableItemsPage);
Expand Down Expand Up @@ -302,15 +292,13 @@ void canMoveMouseToAnElementInAnIframeAndClick() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void testCanClickOnLinks() {
navigateToClicksPageAndClickLink();
}

@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
public void testCanClickOnLinksWithAnOffset() {
driver.get(pages.clicksPage);

Expand All @@ -326,7 +314,6 @@ public void testCanClickOnLinksWithAnOffset() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
public void testClickAfterMoveToAnElementWithAnOffsetShouldUseLastMousePosition() {
driver.get(pages.clickEventPage);

Expand Down Expand Up @@ -370,7 +357,6 @@ private boolean fuzzyPositionMatching(int expectedX, int expectedY, int actualX,
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
public void testMouseMovementWorksWhenNavigatingToAnotherPage() {
navigateToClicksPageAndClickLink();

Expand All @@ -384,8 +370,8 @@ public void testMouseMovementWorksWhenNavigatingToAnotherPage() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
@NotYetImplemented(FIREFOX)
public void testChordControlCutAndPaste() {
assumeFalse(
Expand Down Expand Up @@ -425,7 +411,6 @@ public void testChordControlCutAndPaste() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
public void testCombiningShiftAndClickResultsInANewWindow() {
driver.get(pages.linkedImage);
WebElement link = driver.findElement(By.id("link"));
Expand All @@ -451,7 +436,6 @@ public void testCombiningShiftAndClickResultsInANewWindow() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
public void testHoldingDownShiftKeyWhileClicking() {
driver.get(pages.clickEventPage);

Expand All @@ -468,7 +452,6 @@ public void testHoldingDownShiftKeyWhileClicking() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
public void canClickOnASuckerFishStyleMenu() throws InterruptedException {
driver.get(pages.javascriptPage);

Expand Down Expand Up @@ -496,7 +479,6 @@ public void canClickOnASuckerFishStyleMenu() throws InterruptedException {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void testCanClickOnSuckerFishMenuItem() {
driver.get(pages.javascriptPage);

Expand Down
11 changes: 0 additions & 11 deletions java/test/org/openqa/selenium/bidi/input/DefaultKeyboardTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assumptions.assumeFalse;
import static org.openqa.selenium.testing.TestUtilities.getEffectivePlatform;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.IE;
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;

Expand Down Expand Up @@ -60,7 +59,6 @@ private Actions getBuilder(WebDriver driver) {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void testBasicKeyboardInput() {
driver.get(appServer.whereIs("single_text_input.html"));

Expand All @@ -76,7 +74,6 @@ void testBasicKeyboardInput() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
@NotYetImplemented(SAFARI)
public void testSendingKeyDownOnly() {
driver.get(appServer.whereIs("key_logger.html"));
Expand All @@ -99,7 +96,6 @@ public void testSendingKeyDownOnly() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
@NotYetImplemented(SAFARI)
public void testSendingKeyUp() {
driver.get(appServer.whereIs("key_logger.html"));
Expand Down Expand Up @@ -128,7 +124,6 @@ public void testSendingKeyUp() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
@NotYetImplemented(SAFARI)
public void testSendingKeysWithShiftPressed() {
driver.get(pages.javascriptPage);
Expand Down Expand Up @@ -157,7 +152,6 @@ public void testSendingKeysWithShiftPressed() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
@NotYetImplemented(value = SAFARI, reason = "getText does not normalize spaces")
public void testSendingKeysToActiveElement() {
driver.get(pages.bodyTypingPage);
Expand All @@ -171,7 +165,6 @@ public void testSendingKeysToActiveElement() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
@NotYetImplemented(SAFARI)
public void testBasicKeyboardInputOnActiveElement() {
driver.get(pages.javascriptPage);
Expand All @@ -188,7 +181,6 @@ public void testBasicKeyboardInputOnActiveElement() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void canGenerateKeyboardShortcuts() {
driver.get(appServer.whereIs("keyboard_shortcut.html"));

Expand Down Expand Up @@ -220,7 +212,6 @@ void canGenerateKeyboardShortcuts() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
public void testSelectionSelectBySymbol() {
driver.get(appServer.whereIs("single_text_input.html"));

Expand Down Expand Up @@ -248,7 +239,6 @@ public void testSelectionSelectBySymbol() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
@Ignore(IE)
public void testSelectionSelectByWord() {
assumeFalse(getEffectivePlatform(driver).is(Platform.MAC), "MacOS has alternative keyboard");
Expand Down Expand Up @@ -279,7 +269,6 @@ public void testSelectionSelectByWord() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
void testSelectionSelectAll() {
assumeFalse(getEffectivePlatform(driver).is(Platform.MAC), "MacOS has alternative keyboard");

Expand Down
Loading
Loading