Skip to content

Update dependency org.seleniumhq.selenium:selenium-java to v4.21.0 #1720

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

Merged
merged 5 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f
uses: peaceiris/actions-hugo@v3
with:
hugo-version: ' 0.125.4'
extended: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
uses: actions/checkout@v4

- name: Set up Hugo
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.110.0"
hugo-version: ' 0.125.4'
extended: true

- name: Setup Node
Expand Down Expand Up @@ -51,4 +51,4 @@ jobs:
with:
name: hyperlink-report
path: website_and_docs/tmp/.hyperlink/hyperlink.log
retention-days: 7 # default is 90 days
retention-days: 7 # default is 90 days
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.125.4'
extended: true
Expand Down
2 changes: 1 addition & 1 deletion examples/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
testImplementation 'org.seleniumhq.selenium:selenium-java:4.20.0'
testImplementation 'org.seleniumhq.selenium:selenium-java:4.21.0'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
}

Expand Down
2 changes: 1 addition & 1 deletion examples/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<selenium.version>4.20.0</selenium.version>
<selenium.version>4.21.0</selenium.version>
</properties>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void canLocateNodes() {
BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle());
driver.get("https://www.selenium.dev/selenium/web/xhtmlTest.html");

LocateNodeParameters parameters = new LocateNodeParameters.Builder(Locator.css("div")).build();
LocateNodeParameters parameters = new LocateNodeParameters(Locator.css("div"));

List<RemoteValue> elements = browsingContext.locateNodes(parameters);
Assertions.assertEquals(13, elements.size());
Expand Down Expand Up @@ -81,9 +81,8 @@ void canLocateNodesWithCSSLocator() {
driver.get("https://www.selenium.dev/selenium/web/xhtmlTest.html");

LocateNodeParameters parameters =
new LocateNodeParameters.Builder(Locator.css("div.extraDiv, div.content"))
.setMaxNodeCount(1)
.build();
new LocateNodeParameters(Locator.css("div.extraDiv, div.content"))
.setMaxNodeCount(1);

List<RemoteValue> elements = browsingContext.locateNodes(parameters);

Expand All @@ -101,9 +100,7 @@ void canLocateNodesWithXPathLocator() {
driver.get("https://www.selenium.dev/selenium/web/xhtmlTest.html");

LocateNodeParameters parameters =
new LocateNodeParameters.Builder(Locator.xpath("/html/body/div[2]"))
.setMaxNodeCount(1)
.build();
new LocateNodeParameters(Locator.xpath("/html/body/div[2]")).setMaxNodeCount(1);

List<RemoteValue> elements = browsingContext.locateNodes(parameters);

Expand All @@ -121,9 +118,7 @@ void canLocateNodesWithInnerText() {
driver.get("https://www.selenium.dev/selenium/web/xhtmlTest.html");

LocateNodeParameters parameters =
new LocateNodeParameters.Builder(Locator.innerText("Spaced out"))
.setMaxNodeCount(1)
.build();
new LocateNodeParameters(Locator.innerText("Spaced out")).setMaxNodeCount(1);

List<RemoteValue> elements = browsingContext.locateNodes(parameters);

Expand All @@ -139,44 +134,12 @@ void canLocateNodesWithMaxNodeCount() {
driver.get("https://www.selenium.dev/selenium/web/xhtmlTest.html");

LocateNodeParameters parameters =
new LocateNodeParameters.Builder(Locator.css("div")).setMaxNodeCount(4).build();
new LocateNodeParameters(Locator.css("div")).setMaxNodeCount(4);

List<RemoteValue> elements = browsingContext.locateNodes(parameters);
Assertions.assertEquals(4, elements.size());
}

@Test
@Disabled
void canLocateNodesWithNoneOwnershipParameter() {
BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle());

driver.get("https://www.selenium.dev/selenium/web/xhtmlTest.html");

LocateNodeParameters parameters =
new LocateNodeParameters.Builder(Locator.css("div"))
.setOwnership(ResultOwnership.NONE)
.build();

List<RemoteValue> elements = browsingContext.locateNodes(parameters);
Assertions.assertFalse(elements.get(0).getHandle().isPresent());
}

@Test
@Disabled
void canLocateNodesWithRootOwnershipParameter() {
BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle());

driver.get("https://www.selenium.dev/selenium/web/xhtmlTest.html");

LocateNodeParameters parameters =
new LocateNodeParameters.Builder(Locator.css("div"))
.setOwnership(ResultOwnership.ROOT)
.build();

List<RemoteValue> elements = browsingContext.locateNodes(parameters);
Assertions.assertTrue(elements.get(0).getHandle().isPresent());
}

@Test
@Disabled
void canLocateNodesGivenStartNodes() {
Expand Down Expand Up @@ -205,10 +168,9 @@ void canLocateNodesGivenStartNodes() {
new RemoteReference(RemoteReference.Type.SHARED_ID, value.getSharedId().get())));

LocateNodeParameters parameters =
new LocateNodeParameters.Builder(Locator.css("input"))
new LocateNodeParameters(Locator.css("input"))
.setStartNodes(startNodes)
.setMaxNodeCount(50)
.build();
.setMaxNodeCount(50);

List<RemoteValue> elements = browsingContext.locateNodes(parameters);
Assertions.assertEquals(35, elements.size());
Expand All @@ -223,10 +185,9 @@ void canLocateNodesInAGivenSandbox() {
browsingContext.navigate("https://www.selenium.dev/selenium/web/xhtmlTest.html", ReadinessState.COMPLETE);

LocateNodeParameters parameters =
new LocateNodeParameters.Builder(Locator.css("div"))
new LocateNodeParameters(Locator.css("div"))
.setSandbox(sandbox)
.setMaxNodeCount(1)
.build();
.setMaxNodeCount(1);

List<RemoteValue> elements = browsingContext.locateNodes(parameters);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.openqa.selenium.bidi.module.Script;
import org.openqa.selenium.bidi.browsingcontext.BrowsingContext;
import org.openqa.selenium.bidi.script.LocalValue;
Expand All @@ -28,7 +30,7 @@ public void setup() {
options.setCapability("webSocketUrl", true);
driver = new FirefoxDriver(options);
}

@Test
void canListenToChannelMessage()
throws ExecutionException, InterruptedException, TimeoutException {
Expand All @@ -50,6 +52,7 @@ void canListenToChannelMessage()
}

@Test
@DisabledOnOs(value = OS.MAC, disabledReason = "Works locally, times out on CI")
void canListenToRealmCreatedEvent()
throws ExecutionException, InterruptedException, TimeoutException {
try (Script script = new Script(driver)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L52-L75" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L37-L51" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand All @@ -303,7 +303,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L55-L62" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L58-L68" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand All @@ -322,7 +322,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L72-L79" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L75-L85" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L52-L75" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L37-L51" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand All @@ -313,7 +313,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L55-L62" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L58-L68" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand All @@ -332,7 +332,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L72-L79" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L75-L85" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L52-L75" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L37-L51" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand All @@ -313,7 +313,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L55-L62" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L58-L68" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand All @@ -332,7 +332,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L72-L79" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L75-L85" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand All @@ -344,4 +344,4 @@ This section contains the APIs related to script events.
{{< tab header="Kotlin" >}}
{{< badge-code >}}
{{< /tab >}}
{{< /tabpane >}}
{{< /tabpane >}}
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L52-L75" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L37-L51" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand All @@ -313,7 +313,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L55-L62" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L58-L68" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand All @@ -332,7 +332,7 @@ This section contains the APIs related to script events.
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-version version="4.16" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L72-L79" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L75-L85" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
Expand All @@ -344,4 +344,4 @@ This section contains the APIs related to script events.
{{< tab header="Kotlin" >}}
{{< badge-code >}}
{{< /tab >}}
{{< /tabpane >}}
{{< /tabpane >}}