Skip to content

Commit eb60566

Browse files
Update dependency org.seleniumhq.selenium:selenium-java to v4.21.0 (#1720)
* Update dependency org.seleniumhq.selenium:selenium-java to v4.21.0 * Updating deps and fixing code * Skipping test on macOS * Fixing hugo version * Fixing references --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Diego Molina <[email protected]>
1 parent 77d830f commit eb60566

File tree

11 files changed

+35
-71
lines changed

11 files changed

+35
-71
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
fetch-depth: 0
1717
- name: Setup Hugo
18-
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f
18+
uses: peaceiris/actions-hugo@v3
1919
with:
2020
hugo-version: ' 0.125.4'
2121
extended: true

.github/workflows/link-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
uses: actions/checkout@v4
2020

2121
- name: Set up Hugo
22-
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f
22+
uses: peaceiris/actions-hugo@v3
2323
with:
24-
hugo-version: "0.110.0"
24+
hugo-version: ' 0.125.4'
2525
extended: true
2626

2727
- name: Setup Node
@@ -51,4 +51,4 @@ jobs:
5151
with:
5252
name: hyperlink-report
5353
path: website_and_docs/tmp/.hyperlink/hyperlink.log
54-
retention-days: 7 # default is 90 days
54+
retention-days: 7 # default is 90 days

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Checkout repo
1616
uses: actions/checkout@v4
1717
- name: Setup Hugo
18-
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f
18+
uses: peaceiris/actions-hugo@v3
1919
with:
2020
hugo-version: '0.125.4'
2121
extended: true

examples/java/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repositories {
1010
}
1111

1212
dependencies {
13-
testImplementation 'org.seleniumhq.selenium:selenium-java:4.20.0'
13+
testImplementation 'org.seleniumhq.selenium:selenium-java:4.21.0'
1414
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
1515
}
1616

examples/java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<maven.compiler.source>11</maven.compiler.source>
1414
<maven.compiler.target>11</maven.compiler.target>
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16-
<selenium.version>4.20.0</selenium.version>
16+
<selenium.version>4.21.0</selenium.version>
1717
</properties>
1818

1919
<repositories>

examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LocateNodesTest.java

Lines changed: 10 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void canLocateNodes() {
4747
BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle());
4848
driver.get("https://www.selenium.dev/selenium/web/xhtmlTest.html");
4949

50-
LocateNodeParameters parameters = new LocateNodeParameters.Builder(Locator.css("div")).build();
50+
LocateNodeParameters parameters = new LocateNodeParameters(Locator.css("div"));
5151

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

8383
LocateNodeParameters parameters =
84-
new LocateNodeParameters.Builder(Locator.css("div.extraDiv, div.content"))
85-
.setMaxNodeCount(1)
86-
.build();
84+
new LocateNodeParameters(Locator.css("div.extraDiv, div.content"))
85+
.setMaxNodeCount(1);
8786

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

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

103102
LocateNodeParameters parameters =
104-
new LocateNodeParameters.Builder(Locator.xpath("/html/body/div[2]"))
105-
.setMaxNodeCount(1)
106-
.build();
103+
new LocateNodeParameters(Locator.xpath("/html/body/div[2]")).setMaxNodeCount(1);
107104

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

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

123120
LocateNodeParameters parameters =
124-
new LocateNodeParameters.Builder(Locator.innerText("Spaced out"))
125-
.setMaxNodeCount(1)
126-
.build();
121+
new LocateNodeParameters(Locator.innerText("Spaced out")).setMaxNodeCount(1);
127122

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

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

141136
LocateNodeParameters parameters =
142-
new LocateNodeParameters.Builder(Locator.css("div")).setMaxNodeCount(4).build();
137+
new LocateNodeParameters(Locator.css("div")).setMaxNodeCount(4);
143138

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

148-
@Test
149-
@Disabled
150-
void canLocateNodesWithNoneOwnershipParameter() {
151-
BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle());
152-
153-
driver.get("https://www.selenium.dev/selenium/web/xhtmlTest.html");
154-
155-
LocateNodeParameters parameters =
156-
new LocateNodeParameters.Builder(Locator.css("div"))
157-
.setOwnership(ResultOwnership.NONE)
158-
.build();
159-
160-
List<RemoteValue> elements = browsingContext.locateNodes(parameters);
161-
Assertions.assertFalse(elements.get(0).getHandle().isPresent());
162-
}
163-
164-
@Test
165-
@Disabled
166-
void canLocateNodesWithRootOwnershipParameter() {
167-
BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle());
168-
169-
driver.get("https://www.selenium.dev/selenium/web/xhtmlTest.html");
170-
171-
LocateNodeParameters parameters =
172-
new LocateNodeParameters.Builder(Locator.css("div"))
173-
.setOwnership(ResultOwnership.ROOT)
174-
.build();
175-
176-
List<RemoteValue> elements = browsingContext.locateNodes(parameters);
177-
Assertions.assertTrue(elements.get(0).getHandle().isPresent());
178-
}
179-
180143
@Test
181144
@Disabled
182145
void canLocateNodesGivenStartNodes() {
@@ -205,10 +168,9 @@ void canLocateNodesGivenStartNodes() {
205168
new RemoteReference(RemoteReference.Type.SHARED_ID, value.getSharedId().get())));
206169

207170
LocateNodeParameters parameters =
208-
new LocateNodeParameters.Builder(Locator.css("input"))
171+
new LocateNodeParameters(Locator.css("input"))
209172
.setStartNodes(startNodes)
210-
.setMaxNodeCount(50)
211-
.build();
173+
.setMaxNodeCount(50);
212174

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

225187
LocateNodeParameters parameters =
226-
new LocateNodeParameters.Builder(Locator.css("div"))
188+
new LocateNodeParameters(Locator.css("div"))
227189
.setSandbox(sandbox)
228-
.setMaxNodeCount(1)
229-
.build();
190+
.setMaxNodeCount(1);
230191

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

examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import org.junit.jupiter.api.BeforeEach;
1212
import org.junit.jupiter.api.Disabled;
1313
import org.junit.jupiter.api.Test;
14+
import org.junit.jupiter.api.condition.DisabledOnOs;
15+
import org.junit.jupiter.api.condition.OS;
1416
import org.openqa.selenium.bidi.module.Script;
1517
import org.openqa.selenium.bidi.browsingcontext.BrowsingContext;
1618
import org.openqa.selenium.bidi.script.LocalValue;
@@ -28,7 +30,7 @@ public void setup() {
2830
options.setCapability("webSocketUrl", true);
2931
driver = new FirefoxDriver(options);
3032
}
31-
33+
3234
@Test
3335
void canListenToChannelMessage()
3436
throws ExecutionException, InterruptedException, TimeoutException {
@@ -50,6 +52,7 @@ void canListenToChannelMessage()
5052
}
5153

5254
@Test
55+
@DisabledOnOs(value = OS.MAC, disabledReason = "Works locally, times out on CI")
5356
void canListenToRealmCreatedEvent()
5457
throws ExecutionException, InterruptedException, TimeoutException {
5558
try (Script script = new Script(driver)) {

website_and_docs/content/documentation/webdriver/bidirectional/webdriver_bidi/script.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ This section contains the APIs related to script events.
284284
{{< tabpane text=true >}}
285285
{{< tab header="Java" >}}
286286
{{< badge-version version="4.16" >}}
287-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L52-L75" >}}
287+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L37-L51" >}}
288288
{{< /tab >}}
289289
{{< tab header="Ruby" >}}
290290
{{< badge-code >}}
@@ -303,7 +303,7 @@ This section contains the APIs related to script events.
303303
{{< tabpane text=true >}}
304304
{{< tab header="Java" >}}
305305
{{< badge-version version="4.16" >}}
306-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L55-L62" >}}
306+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L58-L68" >}}
307307
{{< /tab >}}
308308
{{< tab header="Ruby" >}}
309309
{{< badge-code >}}
@@ -322,7 +322,7 @@ This section contains the APIs related to script events.
322322
{{< tabpane text=true >}}
323323
{{< tab header="Java" >}}
324324
{{< badge-version version="4.16" >}}
325-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L72-L79" >}}
325+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L75-L85" >}}
326326
{{< /tab >}}
327327
{{< tab header="Ruby" >}}
328328
{{< badge-code >}}

website_and_docs/content/documentation/webdriver/bidirectional/webdriver_bidi/script.ja.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ This section contains the APIs related to script events.
294294
{{< tabpane text=true >}}
295295
{{< tab header="Java" >}}
296296
{{< badge-version version="4.16" >}}
297-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L52-L75" >}}
297+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L37-L51" >}}
298298
{{< /tab >}}
299299
{{< tab header="Ruby" >}}
300300
{{< badge-code >}}
@@ -313,7 +313,7 @@ This section contains the APIs related to script events.
313313
{{< tabpane text=true >}}
314314
{{< tab header="Java" >}}
315315
{{< badge-version version="4.16" >}}
316-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L55-L62" >}}
316+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L58-L68" >}}
317317
{{< /tab >}}
318318
{{< tab header="Ruby" >}}
319319
{{< badge-code >}}
@@ -332,7 +332,7 @@ This section contains the APIs related to script events.
332332
{{< tabpane text=true >}}
333333
{{< tab header="Java" >}}
334334
{{< badge-version version="4.16" >}}
335-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L72-L79" >}}
335+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L75-L85" >}}
336336
{{< /tab >}}
337337
{{< tab header="Ruby" >}}
338338
{{< badge-code >}}

website_and_docs/content/documentation/webdriver/bidirectional/webdriver_bidi/script.pt-br.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ This section contains the APIs related to script events.
294294
{{< tabpane text=true >}}
295295
{{< tab header="Java" >}}
296296
{{< badge-version version="4.16" >}}
297-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L52-L75" >}}
297+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L37-L51" >}}
298298
{{< /tab >}}
299299
{{< tab header="Ruby" >}}
300300
{{< badge-code >}}
@@ -313,7 +313,7 @@ This section contains the APIs related to script events.
313313
{{< tabpane text=true >}}
314314
{{< tab header="Java" >}}
315315
{{< badge-version version="4.16" >}}
316-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L55-L62" >}}
316+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L58-L68" >}}
317317
{{< /tab >}}
318318
{{< tab header="Ruby" >}}
319319
{{< badge-code >}}
@@ -332,7 +332,7 @@ This section contains the APIs related to script events.
332332
{{< tabpane text=true >}}
333333
{{< tab header="Java" >}}
334334
{{< badge-version version="4.16" >}}
335-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L72-L79" >}}
335+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L75-L85" >}}
336336
{{< /tab >}}
337337
{{< tab header="Ruby" >}}
338338
{{< badge-code >}}
@@ -344,4 +344,4 @@ This section contains the APIs related to script events.
344344
{{< tab header="Kotlin" >}}
345345
{{< badge-code >}}
346346
{{< /tab >}}
347-
{{< /tabpane >}}
347+
{{< /tabpane >}}

website_and_docs/content/documentation/webdriver/bidirectional/webdriver_bidi/script.zh-cn.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ This section contains the APIs related to script events.
294294
{{< tabpane text=true >}}
295295
{{< tab header="Java" >}}
296296
{{< badge-version version="4.16" >}}
297-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L52-L75" >}}
297+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L37-L51" >}}
298298
{{< /tab >}}
299299
{{< tab header="Ruby" >}}
300300
{{< badge-code >}}
@@ -313,7 +313,7 @@ This section contains the APIs related to script events.
313313
{{< tabpane text=true >}}
314314
{{< tab header="Java" >}}
315315
{{< badge-version version="4.16" >}}
316-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L55-L62" >}}
316+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L58-L68" >}}
317317
{{< /tab >}}
318318
{{< tab header="Ruby" >}}
319319
{{< badge-code >}}
@@ -332,7 +332,7 @@ This section contains the APIs related to script events.
332332
{{< tabpane text=true >}}
333333
{{< tab header="Java" >}}
334334
{{< badge-version version="4.16" >}}
335-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L72-L79" >}}
335+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/ScriptEventsTest.java#L75-L85" >}}
336336
{{< /tab >}}
337337
{{< tab header="Ruby" >}}
338338
{{< badge-code >}}
@@ -344,4 +344,4 @@ This section contains the APIs related to script events.
344344
{{< tab header="Kotlin" >}}
345345
{{< badge-code >}}
346346
{{< /tab >}}
347-
{{< /tabpane >}}
347+
{{< /tabpane >}}

0 commit comments

Comments
 (0)