From aaa7e791a4b6be6314250966a4538cd594576254 Mon Sep 17 00:00:00 2001 From: Puja Jagani Date: Thu, 4 Apr 2024 14:37:02 +0530 Subject: [PATCH] [bidi][java] Enable chrome tests (#13770) --- .../openqa/selenium/chrome/ChromeDriverInfo.java | 2 +- .../org/openqa/selenium/bidi/browser/BUILD.bazel | 1 + .../selenium/bidi/browsingcontext/BUILD.bazel | 1 + .../BrowsingContextInspectorTest.java | 8 -------- .../bidi/browsingcontext/BrowsingContextTest.java | 11 ----------- .../org/openqa/selenium/bidi/input/BUILD.bazel | 1 + .../bidi/input/CombinedInputActionsTest.java | 1 + .../selenium/bidi/input/DefaultMouseTest.java | 2 ++ .../test/org/openqa/selenium/bidi/log/BUILD.bazel | 1 + .../bidi/network/NetworkCommandsTest.java | 15 +++++++++++---- .../selenium/bidi/network/NetworkEventsTest.java | 6 +++--- .../org/openqa/selenium/bidi/script/BUILD.bazel | 1 + .../selenium/bidi/script/LocalValueTest.java | 15 --------------- .../selenium/bidi/script/ScriptCommandsTest.java | 15 ++------------- .../selenium/bidi/script/ScriptEventsTest.java | 2 -- .../org/openqa/selenium/bidi/storage/BUILD.bazel | 1 + .../bidi/storage/StorageCommandsTest.java | 4 ---- 17 files changed, 26 insertions(+), 61 deletions(-) diff --git a/java/src/org/openqa/selenium/chrome/ChromeDriverInfo.java b/java/src/org/openqa/selenium/chrome/ChromeDriverInfo.java index 42f6f881d2b0a..ed69ab80517cb 100644 --- a/java/src/org/openqa/selenium/chrome/ChromeDriverInfo.java +++ b/java/src/org/openqa/selenium/chrome/ChromeDriverInfo.java @@ -60,7 +60,7 @@ public boolean isSupportingCdp() { @Override public boolean isSupportingBiDi() { - return false; + return true; } @Override diff --git a/java/test/org/openqa/selenium/bidi/browser/BUILD.bazel b/java/test/org/openqa/selenium/bidi/browser/BUILD.bazel index 1674c63133fa7..1ae44709bdcbf 100644 --- a/java/test/org/openqa/selenium/bidi/browser/BUILD.bazel +++ b/java/test/org/openqa/selenium/bidi/browser/BUILD.bazel @@ -6,6 +6,7 @@ java_selenium_test_suite( size = "large", srcs = glob(["*Test.java"]), browsers = [ + "chrome", "firefox", ], tags = [ diff --git a/java/test/org/openqa/selenium/bidi/browsingcontext/BUILD.bazel b/java/test/org/openqa/selenium/bidi/browsingcontext/BUILD.bazel index c48703c6838fe..f7b25cedc6d25 100644 --- a/java/test/org/openqa/selenium/bidi/browsingcontext/BUILD.bazel +++ b/java/test/org/openqa/selenium/bidi/browsingcontext/BUILD.bazel @@ -6,6 +6,7 @@ java_selenium_test_suite( size = "large", srcs = glob(["*Test.java"]), browsers = [ + "chrome", "firefox", ], tags = [ diff --git a/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextInspectorTest.java b/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextInspectorTest.java index f3210d836b72a..27adf542361f2 100644 --- a/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextInspectorTest.java +++ b/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextInspectorTest.java @@ -52,7 +52,6 @@ public void setUp() { @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canListenToWindowBrowsingContextCreatedEvent() throws ExecutionException, InterruptedException, TimeoutException { @@ -76,7 +75,6 @@ void canListenToWindowBrowsingContextCreatedEvent() @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canListenToBrowsingContextDestroyedEvent() throws ExecutionException, InterruptedException, TimeoutException { @@ -101,7 +99,6 @@ void canListenToBrowsingContextDestroyedEvent() @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canListenToTabBrowsingContextCreatedEvent() throws ExecutionException, InterruptedException, TimeoutException { @@ -124,7 +121,6 @@ void canListenToTabBrowsingContextCreatedEvent() @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canListenToDomContentLoadedEvent() throws ExecutionException, InterruptedException, TimeoutException { @@ -144,7 +140,6 @@ void canListenToDomContentLoadedEvent() @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canListenToBrowsingContextLoadedEvent() throws ExecutionException, InterruptedException, TimeoutException { @@ -184,7 +179,6 @@ void canListenToNavigationStartedEvent() @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canListenToFragmentNavigatedEvent() throws ExecutionException, InterruptedException, TimeoutException { @@ -208,7 +202,6 @@ void canListenToFragmentNavigatedEvent() @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canListenToUserPromptOpenedEvent() throws ExecutionException, InterruptedException, TimeoutException { @@ -231,7 +224,6 @@ void canListenToUserPromptOpenedEvent() @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canListenToUserPromptClosedEvent() throws ExecutionException, InterruptedException, TimeoutException { diff --git a/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java b/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java index d4a2295ac81dc..c83703b3c4812 100644 --- a/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java +++ b/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java @@ -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.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; @@ -77,7 +76,6 @@ void canCreateAWindow() { @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canCreateAWindowWithAReferenceContext() { BrowsingContext browsingContext = @@ -96,7 +94,6 @@ void canCreateATab() { @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canCreateATabWithAReferenceContext() { BrowsingContext browsingContext = @@ -133,7 +130,6 @@ void canNavigateToAUrlWithReadinessState() { @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canGetTreeWithAChild() { String referenceContextId = driver.getWindowHandle(); @@ -155,7 +151,6 @@ void canGetTreeWithAChild() { @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(EDGE) void canGetTreeWithDepth() { String referenceContextId = driver.getWindowHandle(); @@ -239,7 +234,6 @@ void canReloadABrowsingContext() { NavigationResult reloadInfo = browsingContext.reload(); - assertThat(reloadInfo.getNavigationId()).isNotNull(); assertThat(reloadInfo.getUrl()).contains("/bidi/logEntryAdded.html"); } @@ -410,7 +404,6 @@ void canCaptureScreenshotWithAllParameters() { @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) void canCaptureScreenshotOfViewport() { BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle()); @@ -429,7 +422,6 @@ void canCaptureScreenshotOfViewport() { @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) void canCaptureElementScreenshot() { BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle()); @@ -464,7 +456,6 @@ void canSetViewport() { @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) @NotYetImplemented(FIREFOX) void canSetViewportWithDevicePixelRatio() { BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle()); @@ -508,7 +499,6 @@ void canPrintPage() { @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) void canNavigateBackInTheBrowserHistory() { BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle()); browsingContext.navigate(pages.formPage, ReadinessState.COMPLETE); @@ -523,7 +513,6 @@ void canNavigateBackInTheBrowserHistory() { @Test @NotYetImplemented(SAFARI) @NotYetImplemented(IE) - @NotYetImplemented(CHROME) void canNavigateForwardInTheBrowserHistory() { BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle()); browsingContext.navigate(pages.formPage, ReadinessState.COMPLETE); diff --git a/java/test/org/openqa/selenium/bidi/input/BUILD.bazel b/java/test/org/openqa/selenium/bidi/input/BUILD.bazel index 33e1bdfd8451e..d37b61ef4a871 100644 --- a/java/test/org/openqa/selenium/bidi/input/BUILD.bazel +++ b/java/test/org/openqa/selenium/bidi/input/BUILD.bazel @@ -6,6 +6,7 @@ java_selenium_test_suite( size = "large", srcs = glob(["*Test.java"]), browsers = [ + "chrome", "firefox", ], data = [ diff --git a/java/test/org/openqa/selenium/bidi/input/CombinedInputActionsTest.java b/java/test/org/openqa/selenium/bidi/input/CombinedInputActionsTest.java index be18a31db19c9..613fee907c192 100644 --- a/java/test/org/openqa/selenium/bidi/input/CombinedInputActionsTest.java +++ b/java/test/org/openqa/selenium/bidi/input/CombinedInputActionsTest.java @@ -260,6 +260,7 @@ private void navigateToClicksPageAndClickLink() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canMoveMouseToAnElementInAnIframeAndClick() { driver.get(appServer.whereIs("click_tests/click_in_iframe.html")); diff --git a/java/test/org/openqa/selenium/bidi/input/DefaultMouseTest.java b/java/test/org/openqa/selenium/bidi/input/DefaultMouseTest.java index e8e2664f76dcf..929b404350013 100644 --- a/java/test/org/openqa/selenium/bidi/input/DefaultMouseTest.java +++ b/java/test/org/openqa/selenium/bidi/input/DefaultMouseTest.java @@ -224,6 +224,7 @@ void testContextClick() { @NeedsFreshDriver @Test @Ignore(value = FIREFOX, gitHubActions = true) + @Ignore(value = CHROME, gitHubActions = true) @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) @@ -263,6 +264,7 @@ void testMoveAndClick() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void testShouldClickElementInIFrame() { driver.get(pages.clicksPage); driver.switchTo().frame("source"); diff --git a/java/test/org/openqa/selenium/bidi/log/BUILD.bazel b/java/test/org/openqa/selenium/bidi/log/BUILD.bazel index c48703c6838fe..f7b25cedc6d25 100644 --- a/java/test/org/openqa/selenium/bidi/log/BUILD.bazel +++ b/java/test/org/openqa/selenium/bidi/log/BUILD.bazel @@ -6,6 +6,7 @@ java_selenium_test_suite( size = "large", srcs = glob(["*Test.java"]), browsers = [ + "chrome", "firefox", ], tags = [ diff --git a/java/test/org/openqa/selenium/bidi/network/NetworkCommandsTest.java b/java/test/org/openqa/selenium/bidi/network/NetworkCommandsTest.java index e68493c199f2d..500566f2b7d71 100644 --- a/java/test/org/openqa/selenium/bidi/network/NetworkCommandsTest.java +++ b/java/test/org/openqa/selenium/bidi/network/NetworkCommandsTest.java @@ -20,10 +20,7 @@ import static org.assertj.core.api.AssertionsForClassTypes.assertThat; import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; 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; +import static org.openqa.selenium.testing.drivers.Browser.*; import java.time.Duration; import java.time.temporal.ChronoUnit; @@ -59,6 +56,7 @@ public void setUp() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canAddIntercept() { try (Network network = new Network(driver)) { String intercept = @@ -71,6 +69,7 @@ void canAddIntercept() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canContinueRequest() throws InterruptedException { try (Network network = new Network(driver)) { String intercept = @@ -105,6 +104,7 @@ void canContinueRequest() throws InterruptedException { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canContinueResponse() throws InterruptedException { try (Network network = new Network(driver)) { String intercept = @@ -134,6 +134,7 @@ void canContinueResponse() throws InterruptedException { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canProvideResponse() throws InterruptedException { try (Network network = new Network(driver)) { String intercept = @@ -163,6 +164,7 @@ void canProvideResponse() throws InterruptedException { @NotYetImplemented(IE) @NotYetImplemented(EDGE) @NotYetImplemented(FIREFOX) + @NotYetImplemented(CHROME) // TODO: Browsers are yet to implement all parameters. Once implemented, add exhaustive tests. void canProvideResponseWithAllParameters() throws InterruptedException { try (Network network = new Network(driver)) { @@ -198,6 +200,7 @@ void canProvideResponseWithAllParameters() throws InterruptedException { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canRemoveIntercept() { try (Network network = new Network(driver)) { String intercept = @@ -212,6 +215,7 @@ void canRemoveIntercept() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canContinueWithAuthCredentials() { try (Network network = new Network(driver)) { network.addIntercept(new AddInterceptParameters(InterceptPhase.AUTH_REQUIRED)); @@ -231,6 +235,7 @@ void canContinueWithAuthCredentials() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canContinueWithoutAuthCredentials() { try (Network network = new Network(driver)) { network.addIntercept(new AddInterceptParameters(InterceptPhase.AUTH_REQUIRED)); @@ -250,6 +255,7 @@ void canContinueWithoutAuthCredentials() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canCancelAuth() { try (Network network = new Network(driver)) { network.addIntercept(new AddInterceptParameters(InterceptPhase.AUTH_REQUIRED)); @@ -268,6 +274,7 @@ void canCancelAuth() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canFailRequest() { try (Network network = new Network(driver)) { network.addIntercept(new AddInterceptParameters(InterceptPhase.BEFORE_REQUEST_SENT)); diff --git a/java/test/org/openqa/selenium/bidi/network/NetworkEventsTest.java b/java/test/org/openqa/selenium/bidi/network/NetworkEventsTest.java index 049ce6e588e61..95a455beb9bdf 100644 --- a/java/test/org/openqa/selenium/bidi/network/NetworkEventsTest.java +++ b/java/test/org/openqa/selenium/bidi/network/NetworkEventsTest.java @@ -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.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -148,6 +146,7 @@ void canListenToResponseCompletedEventWithCookie() @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canListenToOnAuthRequiredEvent() throws ExecutionException, InterruptedException, TimeoutException { try (Network network = new Network(driver)) { @@ -172,6 +171,7 @@ void canListenToOnAuthRequiredEvent() @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) + @NotYetImplemented(CHROME) void canListenToFetchError() throws ExecutionException, InterruptedException, TimeoutException { try (Network network = new Network(driver)) { CompletableFuture future = new CompletableFuture<>(); diff --git a/java/test/org/openqa/selenium/bidi/script/BUILD.bazel b/java/test/org/openqa/selenium/bidi/script/BUILD.bazel index c48703c6838fe..f7b25cedc6d25 100644 --- a/java/test/org/openqa/selenium/bidi/script/BUILD.bazel +++ b/java/test/org/openqa/selenium/bidi/script/BUILD.bazel @@ -6,6 +6,7 @@ java_selenium_test_suite( size = "large", srcs = glob(["*Test.java"]), browsers = [ + "chrome", "firefox", ], tags = [ diff --git a/java/test/org/openqa/selenium/bidi/script/LocalValueTest.java b/java/test/org/openqa/selenium/bidi/script/LocalValueTest.java index e20e1e4b07b36..dd95da5350906 100644 --- a/java/test/org/openqa/selenium/bidi/script/LocalValueTest.java +++ b/java/test/org/openqa/selenium/bidi/script/LocalValueTest.java @@ -18,7 +18,6 @@ package org.openqa.selenium.bidi.script; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -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; @@ -42,7 +41,6 @@ class LocalValueTest extends JupiterTestBase { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithUndefinedArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -76,7 +74,6 @@ void canCallFunctionWithUndefinedArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithNullArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -110,7 +107,6 @@ void canCallFunctionWithNullArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithMinusZeroArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -146,7 +142,6 @@ void canCallFunctionWithMinusZeroArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithInfinityArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -182,7 +177,6 @@ void canCallFunctionWithInfinityArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithMinusInfinityArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -219,7 +213,6 @@ void canCallFunctionWithMinusInfinityArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithNumberArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -255,7 +248,6 @@ void canCallFunctionWithNumberArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithBooleanArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -291,7 +283,6 @@ void canCallFunctionWithBooleanArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithBigIntArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -327,7 +318,6 @@ void canCallFunctionWithBigIntArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithArrayArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -369,7 +359,6 @@ void canCallFunctionWithArrayArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithSetArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -411,7 +400,6 @@ void canCallFunctionWithSetArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithDateArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -448,7 +436,6 @@ void canCallFunctionWithDateArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithMapArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -492,7 +479,6 @@ void canCallFunctionWithMapArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithObjectArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -536,7 +522,6 @@ void canCallFunctionWithObjectArgument() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithRegExpArgument() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); diff --git a/java/test/org/openqa/selenium/bidi/script/ScriptCommandsTest.java b/java/test/org/openqa/selenium/bidi/script/ScriptCommandsTest.java index 18f7e0b47bfd5..efa79508270a2 100644 --- a/java/test/org/openqa/selenium/bidi/script/ScriptCommandsTest.java +++ b/java/test/org/openqa/selenium/bidi/script/ScriptCommandsTest.java @@ -64,7 +64,6 @@ public void setUp() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithDeclaration() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -86,7 +85,6 @@ void canCallFunctionWithDeclaration() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithArguments() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -119,7 +117,6 @@ void canCallFunctionWithArguments() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionToGetIFrameBrowsingContext() { String url = appServer.whereIs("click_too_big_in_frame.html"); driver.get(url); @@ -188,7 +185,6 @@ void canCallFunctionToGetElement() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithAwaitPromise() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -219,7 +215,6 @@ void canCallFunctionWithAwaitPromise() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithAwaitPromiseFalse() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -248,7 +243,6 @@ void canCallFunctionWithAwaitPromiseFalse() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithThisParameter() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -279,7 +273,6 @@ void canCallFunctionWithThisParameter() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithOwnershipRoot() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -305,7 +298,6 @@ void canCallFunctionWithOwnershipRoot() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionWithOwnershipNone() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -361,7 +353,6 @@ void canCallFunctionThatThrowsException() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionInASandBox() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -512,10 +503,8 @@ void canEvaluateScriptThatThrowsException() { EvaluateResultExceptionValue exception = (EvaluateResultExceptionValue) result; assertThat(exception.getExceptionDetails().getException().getType()).isEqualTo("error"); - assertThat(exception.getExceptionDetails().getText()) - .isEqualTo("SyntaxError: expected expression, got ')'"); - assertThat(exception.getExceptionDetails().getLineNumber()).isPositive(); - assertThat(exception.getExceptionDetails().getColumnNumber()).isPositive(); + assertThat(exception.getExceptionDetails().getText()).contains("SyntaxError:"); + assertThat(exception.getExceptionDetails().getLineNumber()).isGreaterThanOrEqualTo(0); assertThat(exception.getExceptionDetails().getStacktrace().getCallFrames().size()).isEqualTo(0); } diff --git a/java/test/org/openqa/selenium/bidi/script/ScriptEventsTest.java b/java/test/org/openqa/selenium/bidi/script/ScriptEventsTest.java index 13f10c7e5ecdb..b80a32bfeb1f3 100644 --- a/java/test/org/openqa/selenium/bidi/script/ScriptEventsTest.java +++ b/java/test/org/openqa/selenium/bidi/script/ScriptEventsTest.java @@ -54,7 +54,6 @@ public void setUp() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canListenToChannelMessage() throws ExecutionException, InterruptedException, TimeoutException { try (Script script = new Script(driver)) { @@ -85,7 +84,6 @@ void canListenToChannelMessage() @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canListenToRealmCreatedEvent() throws ExecutionException, InterruptedException, TimeoutException { try (Script script = new Script(driver)) { diff --git a/java/test/org/openqa/selenium/bidi/storage/BUILD.bazel b/java/test/org/openqa/selenium/bidi/storage/BUILD.bazel index 02a018235e42d..96db6d7d060d2 100644 --- a/java/test/org/openqa/selenium/bidi/storage/BUILD.bazel +++ b/java/test/org/openqa/selenium/bidi/storage/BUILD.bazel @@ -6,6 +6,7 @@ java_selenium_test_suite( size = "large", srcs = glob(["*Test.java"]), browsers = [ + "chrome", "firefox", ], tags = [ diff --git a/java/test/org/openqa/selenium/bidi/storage/StorageCommandsTest.java b/java/test/org/openqa/selenium/bidi/storage/StorageCommandsTest.java index 371887460f64a..22edfe3629323 100644 --- a/java/test/org/openqa/selenium/bidi/storage/StorageCommandsTest.java +++ b/java/test/org/openqa/selenium/bidi/storage/StorageCommandsTest.java @@ -67,7 +67,6 @@ public void setUp() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) public void canGetCookieByName() { String key = generateUniqueKey(); String value = "set"; @@ -138,7 +137,6 @@ public void canGetCookieInAUserContext() {} @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) public void canAddCookie() { String key = generateUniqueKey(); String value = "foo"; @@ -228,7 +226,6 @@ public void canAddAndGetCookie() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) public void canGetAllCookies() { String key1 = generateUniqueKey(); String key2 = generateUniqueKey(); @@ -303,7 +300,6 @@ public void canDeleteCookieWithName() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) public void testAddCookiesWithDifferentPathsThatAreRelatedToOurs() { driver.get(appServer.whereIs("/common/animals"));