Skip to content

Commit

Permalink
[bidi][java] Enable chrome tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani committed Apr 3, 2024
1 parent 911b312 commit 4dbbce9
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 61 deletions.
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 @@ -6,6 +6,7 @@ java_selenium_test_suite(
size = "large",
srcs = glob(["*Test.java"]),
browsers = [
"chrome",
"firefox",
],
tags = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ java_selenium_test_suite(
size = "large",
srcs = glob(["*Test.java"]),
browsers = [
"chrome",
"firefox",
],
tags = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public void setUp() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canListenToWindowBrowsingContextCreatedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
Expand All @@ -76,7 +75,6 @@ void canListenToWindowBrowsingContextCreatedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canListenToBrowsingContextDestroyedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
Expand All @@ -101,7 +99,6 @@ void canListenToBrowsingContextDestroyedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canListenToTabBrowsingContextCreatedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
Expand All @@ -124,7 +121,6 @@ void canListenToTabBrowsingContextCreatedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canListenToDomContentLoadedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
Expand All @@ -144,7 +140,6 @@ void canListenToDomContentLoadedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canListenToBrowsingContextLoadedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
Expand Down Expand Up @@ -184,7 +179,6 @@ void canListenToNavigationStartedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canListenToFragmentNavigatedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
Expand All @@ -208,7 +202,6 @@ void canListenToFragmentNavigatedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canListenToUserPromptOpenedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
Expand All @@ -231,7 +224,6 @@ void canListenToUserPromptOpenedEvent()
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canListenToUserPromptClosedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
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.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;
Expand Down Expand Up @@ -77,7 +76,6 @@ void canCreateAWindow() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canCreateAWindowWithAReferenceContext() {
BrowsingContext browsingContext =
Expand All @@ -96,7 +94,6 @@ void canCreateATab() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canCreateATabWithAReferenceContext() {
BrowsingContext browsingContext =
Expand Down Expand Up @@ -133,7 +130,6 @@ void canNavigateToAUrlWithReadinessState() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canGetTreeWithAChild() {
String referenceContextId = driver.getWindowHandle();
Expand All @@ -155,7 +151,6 @@ void canGetTreeWithAChild() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(EDGE)
void canGetTreeWithDepth() {
String referenceContextId = driver.getWindowHandle();
Expand Down Expand Up @@ -238,8 +233,7 @@ void canReloadABrowsingContext() {
browsingContext.navigate(url, ReadinessState.COMPLETE);

NavigationResult reloadInfo = browsingContext.reload();

assertThat(reloadInfo.getNavigationId()).isNotNull();

assertThat(reloadInfo.getUrl()).contains("/bidi/logEntryAdded.html");
}

Expand Down Expand Up @@ -410,7 +404,6 @@ void canCaptureScreenshotWithAllParameters() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
void canCaptureScreenshotOfViewport() {
BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle());

Expand All @@ -429,7 +422,6 @@ void canCaptureScreenshotOfViewport() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
void canCaptureElementScreenshot() {
BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle());

Expand Down Expand Up @@ -464,7 +456,6 @@ void canSetViewport() {
@Test
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(CHROME)
@NotYetImplemented(FIREFOX)
void canSetViewportWithDevicePixelRatio() {
BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle());
Expand Down Expand Up @@ -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);
Expand All @@ -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);
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 @@ -6,6 +6,7 @@ java_selenium_test_suite(
size = "large",
srcs = glob(["*Test.java"]),
browsers = [
"chrome",
"firefox",
],
data = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ void testMoveAndClick() {
@NotYetImplemented(SAFARI)
@NotYetImplemented(IE)
@NotYetImplemented(EDGE)
@NotYetImplemented(CHROME)
void testShouldClickElementInIFrame() {
driver.get(pages.clicksPage);
driver.switchTo().frame("source");
Expand Down
1 change: 1 addition & 0 deletions java/test/org/openqa/selenium/bidi/log/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ java_selenium_test_suite(
size = "large",
srcs = glob(["*Test.java"]),
browsers = [
"chrome",
"firefox",
],
tags = [
Expand Down
1 change: 1 addition & 0 deletions java/test/org/openqa/selenium/bidi/network/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ java_selenium_test_suite(
size = "large",
srcs = glob(["*Test.java"]),
browsers = [
"chrome",
"firefox",
],
tags = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 =
Expand All @@ -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 =
Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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 =
Expand All @@ -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));
Expand All @@ -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));
Expand All @@ -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));
Expand All @@ -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));
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.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
Expand Down Expand Up @@ -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)) {
Expand All @@ -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<FetchError> future = new CompletableFuture<>();
Expand Down
1 change: 1 addition & 0 deletions java/test/org/openqa/selenium/bidi/script/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ java_selenium_test_suite(
size = "large",
srcs = glob(["*Test.java"]),
browsers = [
"chrome",
"firefox",
],
tags = [
Expand Down
Loading

0 comments on commit 4dbbce9

Please sign in to comment.