Skip to content

Commit 4b584ef

Browse files
committed
[java] Enable Edge tests on RBE
1 parent 66c08fe commit 4b584ef

11 files changed

+33
-8
lines changed

.skipped-tests

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@
1212
-//java/test/org/openqa/selenium/bidi/browsingcontext:BrowsingContextTest-remote
1313
-//java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest
1414
-//java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest-remote
15+
-//java/test/org/openqa/selenium/edge:EdgeDriverFunctionalTest
16+
-//java/test/org/openqa/selenium/edge:EdgeDriverFunctionalTest-edge
17+
-//java/test/org/openqa/selenium/edge:EdgeDriverFunctionalTest-remote
1518
-//java/test/org/openqa/selenium/federatedcredentialmanagement:FederatedCredentialManagementTest
1619
-//java/test/org/openqa/selenium/firefox:FirefoxDriverBuilderTest
1720
-//java/test/org/openqa/selenium/grid/gridui:OverallGridTest
1821
-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest
1922
-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest-chrome
2023
-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest-chrome-remote
24+
-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest-edge
25+
-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest-edge-remote
2126
-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest-remote
2227
-//java/test/org/openqa/selenium/interactions:DefaultMouseTest
2328
-//java/test/org/openqa/selenium/interactions:DefaultMouseTest-remote

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ There are a number of bazel configurations specific for testing.
237237
### Common Options Examples
238238

239239
Here are examples of arguments we make use of in testing the Selenium code:
240-
* `--pin_browsers=true` - run specific browser versions defined in the build (versions are updated regularly)
240+
* `--pin_browsers` - run specific browser versions defined in the build (versions are updated regularly)
241+
* `--headless` - run browsers in headless mode (supported be Chrome, Edge and Firefox)
241242
* `--flaky_test_attempts 3` - re-run failed tests up to 3 times
242243
* `--local_test_jobs 1` - control parallelism of tests
243244
* `--cache_test_results=no`, `-t-` - disable caching of test results and re-runs all of them
@@ -368,11 +369,6 @@ Supported browsers:
368369
* `safari`
369370
* `safari-preview`
370371

371-
Useful command line options:
372-
373-
* `--pin_browsers` - use browsers and drivers downloaded by Bazel
374-
* `--headless` - run browsers in headless mode (supported be Chrome, Edge and Firefox)
375-
376372
In addition to the [Common Options Examples](#common-options-examples), here are some additional Ruby specific ones:
377373
* `--test_arg "-tfocus"` - test only [focused specs](https://relishapp.com/rspec/rspec-core/v/3-12/docs/filtering/inclusion-filters)
378374
* `--test_arg "-eTimeouts"` - test only specs which name include "Timeouts"

java/browsers.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,19 @@ chrome_jvm_flags = select({
2727
}) + chromedriver_jvm_flags
2828

2929
edgedriver_jvm_flags = select({
30+
"@selenium//common:use_pinned_linux_edge": [
31+
"-Dwebdriver.edge.driver=$(location @linux_edgedriver//:msedgedriver)",
32+
],
3033
"@selenium//common:use_pinned_macos_edge": [
3134
"-Dwebdriver.edge.driver=$(location @mac_edgedriver//:msedgedriver)",
3235
],
3336
"//conditions:default": [],
3437
})
3538

3639
edge_jvm_flags = select({
40+
"@selenium//common:use_pinned_linux_edge": [
41+
"-Dwebdriver.edge.binary=$(location @linux_edge//:opt/microsoft/msedge/microsoft-edge)",
42+
],
3743
"@selenium//common:use_pinned_macos_edge": [
3844
"-Dwebdriver.edge.binary=\"$(location @mac_edge//:Edge.app)/Contents/MacOS/Microsoft Edge\"",
3945
],

java/private/selenium_test.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ BROWSERS = {
3030
"deps": ["//java/src/org/openqa/selenium/edge"],
3131
"jvm_flags": ["-Dselenium.browser=edge"] + edge_jvm_flags,
3232
"data": edge_data,
33-
"tags": COMMON_TAGS + ["edge", "skip-remote"],
33+
"tags": COMMON_TAGS + ["edge"],
3434
},
3535
"firefox": {
3636
"deps": ["//java/src/org/openqa/selenium/firefox"],

java/test/org/openqa/selenium/CookieImplementationTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import static org.junit.jupiter.api.Assumptions.assumeTrue;
2222
import static org.openqa.selenium.testing.drivers.Browser.ALL;
2323
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
24+
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
2425
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
2526
import static org.openqa.selenium.testing.drivers.Browser.IE;
2627
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
@@ -205,6 +206,7 @@ public void testAddCookiesWithDifferentPathsThatAreRelatedToOurs() {
205206
@Test
206207
@Ignore(SAFARI)
207208
@NotWorkingInRemoteBazelBuilds(CHROME)
209+
@NotWorkingInRemoteBazelBuilds(EDGE)
208210
@NotWorkingInRemoteBazelBuilds(FIREFOX)
209211
public void testGetCookiesInAFrame() {
210212
driver.get(domainHelper.getUrlForFirstValidHostname("/common/animals"));
@@ -301,6 +303,7 @@ public void testShouldBeAbleToSetDomainToTheCurrentDomain() throws Exception {
301303
@Test
302304
@NotYetImplemented(SAFARI)
303305
@NotWorkingInRemoteBazelBuilds(CHROME)
306+
@NotWorkingInRemoteBazelBuilds(EDGE)
304307
@NotWorkingInRemoteBazelBuilds(FIREFOX)
305308
public void testShouldWalkThePathToDeleteACookie() {
306309
Cookie cookie1 = new Cookie.Builder("fish", "cod").build();
@@ -348,6 +351,7 @@ public void testShouldIgnoreThePortNumberOfTheHostWhenSettingTheCookie() throws
348351
@Test
349352
@NotYetImplemented(SAFARI)
350353
@NotWorkingInRemoteBazelBuilds(CHROME)
354+
@NotWorkingInRemoteBazelBuilds(EDGE)
351355
@NotWorkingInRemoteBazelBuilds(FIREFOX)
352356
public void testCookieEqualityAfterSetAndGet() {
353357
driver.get(domainHelper.getUrlForFirstValidHostname("animals"));
@@ -394,6 +398,7 @@ public void testRetainsCookieExpiry() {
394398
@Ignore(IE)
395399
@Ignore(SAFARI)
396400
@NotWorkingInRemoteBazelBuilds(CHROME)
401+
@NotWorkingInRemoteBazelBuilds(EDGE)
397402
@NotWorkingInRemoteBazelBuilds(FIREFOX)
398403
public void canHandleSecureCookie() {
399404
driver.get(domainHelper.getSecureUrlForFirstValidHostname("animals"));
@@ -412,6 +417,7 @@ public void canHandleSecureCookie() {
412417
@Ignore(IE)
413418
@Ignore(SAFARI)
414419
@NotWorkingInRemoteBazelBuilds(CHROME)
420+
@NotWorkingInRemoteBazelBuilds(EDGE)
415421
@NotWorkingInRemoteBazelBuilds(FIREFOX)
416422
public void testRetainsCookieSecure() {
417423
driver.get(domainHelper.getSecureUrlForFirstValidHostname("animals"));
@@ -430,6 +436,7 @@ public void testRetainsCookieSecure() {
430436
@Test
431437
@Ignore(SAFARI)
432438
@NotWorkingInRemoteBazelBuilds(CHROME)
439+
@NotWorkingInRemoteBazelBuilds(EDGE)
433440
@NotWorkingInRemoteBazelBuilds(FIREFOX)
434441
public void canHandleHttpOnlyCookie() {
435442
Cookie addedCookie =
@@ -445,6 +452,7 @@ public void canHandleHttpOnlyCookie() {
445452
@Test
446453
@Ignore(SAFARI)
447454
@NotWorkingInRemoteBazelBuilds(CHROME)
455+
@NotWorkingInRemoteBazelBuilds(EDGE)
448456
@NotWorkingInRemoteBazelBuilds(FIREFOX)
449457
public void testRetainsHttpOnlyFlag() {
450458
Cookie addedCookie =

java/test/org/openqa/selenium/ExecutingAsyncJavascriptTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public void setUp() {
5050

5151
@Test
5252
@NotYetImplemented(value = CHROME, reason = "Default to 5s")
53+
@NotYetImplemented(value = EDGE, reason = "Default to 5s")
5354
@NotYetImplemented(value = FIREFOX, reason = "Default to 5s")
5455
@NotYetImplemented(value = SAFARI, reason = "Default to 5s")
5556
public void shouldSetAndGetScriptTimeout() {

java/test/org/openqa/selenium/ExecutingJavascriptTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ public void testShouldThrowAnExceptionWhenArgumentsWithStaleElementPassed() {
491491
@Test
492492
@Ignore(IE)
493493
@Ignore(value = CHROME, reason = "https://bugs.chromium.org/p/chromedriver/issues/detail?id=4395")
494+
@Ignore(value = EDGE, reason = "https://bugs.chromium.org/p/chromedriver/issues/detail?id=4395")
494495
public void testShouldBeAbleToReturnADateObject() throws ParseException {
495496
driver.get(pages.simpleTestPage);
496497

java/test/org/openqa/selenium/PageLoadingTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
2626
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOfElementLocated;
2727
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
28+
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
2829
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
2930
import static org.openqa.selenium.testing.drivers.Browser.IE;
3031
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
@@ -72,6 +73,7 @@ void testShouldBeAbleToGetAFragmentOnTheCurrentPage() {
7273

7374
@Test
7475
@NotYetImplemented(CHROME)
76+
@NotYetImplemented(EDGE)
7577
@NotYetImplemented(FIREFOX)
7678
public void testShouldReturnWhenGettingAUrlThatDoesNotResolve() {
7779
assertThatCode(() -> driver.get("http://www.thisurldoesnotexist.comx/"))
@@ -93,6 +95,7 @@ public void testShouldThrowIfUrlIsMalformedInPortPart() {
9395

9496
@Test
9597
@NotYetImplemented(CHROME)
98+
@NotYetImplemented(EDGE)
9699
@NotYetImplemented(FIREFOX)
97100
public void testShouldReturnWhenGettingAUrlThatDoesNotConnect() {
98101
// Here's hoping that there's nothing here. There shouldn't be

java/test/org/openqa/selenium/ProxySettingTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import static org.assertj.core.api.Assertions.assertThat;
2323
import static org.openqa.selenium.remote.CapabilityType.PROXY;
2424
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
25+
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
2526
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
2627
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
2728

@@ -111,6 +112,7 @@ public void canConfigureProxyThroughPACFile() throws URISyntaxException, Interru
111112
@NoDriverAfterTest
112113
@Ignore(value = FIREFOX, travis = true)
113114
@Ignore(value = CHROME, reason = "Flaky")
115+
@Ignore(value = EDGE, reason = "Flaky")
114116
public void canUsePACThatOnlyProxiesCertainHosts()
115117
throws URISyntaxException, InterruptedException {
116118
try (SimpleHttpServer helloServer =

java/test/org/openqa/selenium/edge/EdgeDriverFunctionalTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import static org.assertj.core.api.Assertions.fail;
2323
import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy;
2424
import static org.assertj.core.api.Assumptions.assumeThat;
25+
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
2526

2627
import java.time.Duration;
2728
import java.util.List;
@@ -39,6 +40,7 @@
3940
import org.openqa.selenium.chromium.HasPermissions;
4041
import org.openqa.selenium.remote.RemoteWebDriverBuilder;
4142
import org.openqa.selenium.remote.http.ClientConfig;
43+
import org.openqa.selenium.testing.Ignore;
4244
import org.openqa.selenium.testing.JupiterTestBase;
4345
import org.openqa.selenium.testing.NoDriverBeforeTest;
4446
import org.openqa.selenium.testing.drivers.WebDriverBuilder;
@@ -93,6 +95,7 @@ void builderWithClientConfigThrowsException() {
9395
}
9496

9597
@Test
98+
@Ignore(value = EDGE, reason = "https://bugs.chromium.org/p/chromedriver/issues/detail?id=4350")
9699
void canSetPermission() {
97100
HasPermissions permissions = (HasPermissions) driver;
98101

0 commit comments

Comments
 (0)