Skip to content

Commit 6b3cccc

Browse files
authored
[java] Remove a wrong code example and update code lines (#2104)
Remove a wrong code example and update code lines
1 parent ff1ddd7 commit 6b3cccc

File tree

5 files changed

+14
-29
lines changed

5 files changed

+14
-29
lines changed

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@ public void setup() {
2727
driver = new FirefoxDriver(options);
2828
}
2929

30-
@Test
31-
public void jsErrors() {
32-
CopyOnWriteArrayList<ConsoleLogEntry> logs = new CopyOnWriteArrayList<>();
33-
34-
try (LogInspector logInspector = new LogInspector(driver)) {
35-
logInspector.onConsoleEntry(logs::add);
36-
}
37-
38-
driver.get("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html");
39-
driver.findElement(By.id("consoleLog")).click();
40-
41-
new WebDriverWait(driver, Duration.ofSeconds(5)).until(_d -> !logs.isEmpty());
42-
Assertions.assertEquals("Hello, world!", logs.get(0).getText());
43-
}
44-
4530
@Test
4631
void testListenToConsoleLog() throws ExecutionException, InterruptedException, TimeoutException {
4732
try (LogInspector logInspector = new LogInspector(driver)) {

website_and_docs/content/documentation/webdriver/bidi/w3c/log.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Listen to the `console.log` events and register callbacks to process the event.
1616
{{< tabpane text=true >}}
1717
{{< tab header="Java" >}}
1818
{{< badge-version version="4.8" >}}
19-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L31-L38" >}}
19+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}}
2020
{{< /tab >}}
2121
{{< tab header="Ruby" >}}
2222
{{< badge-code >}}
@@ -36,7 +36,7 @@ and register callbacks to process the exception details.
3636

3737
{{< tabpane text=true >}}
3838
{{< tab header="Java" >}}
39-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L70-L77" >}}
39+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}}
4040
{{< /tab >}}
4141
{{< tab header="Ruby" >}}
4242
{{< badge-code >}}
@@ -56,7 +56,7 @@ Listen to all JS logs at all levels and register callbacks to process the log.
5656
{{< tabpane text=true >}}
5757
{{< tab header="Java" >}}
5858
{{< badge-version version="4.8" >}}
59-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L52-L59" >}}
59+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}}
6060
{{< /tab >}}
6161
{{< tab header="Ruby" >}}
6262
{{< badge-code >}}

website_and_docs/content/documentation/webdriver/bidi/w3c/log.ja.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Listen to the `console.log` events and register callbacks to process the event.
2222
{{< tabpane text=true >}}
2323
{{< tab header="Java" >}}
2424
{{< badge-version version="4.8" >}}
25-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L31-L38" >}}
25+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}}
2626
{{< /tab >}}
2727
{{< tab header="Ruby" >}}
2828
{{< badge-code >}}
@@ -42,7 +42,7 @@ and register callbacks to process the exception details.
4242

4343
{{< tabpane text=true >}}
4444
{{< tab header="Java" >}}
45-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L70-L77" >}}
45+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}}
4646
{{< /tab >}}
4747
{{< tab header="Ruby" >}}
4848
{{< badge-code >}}
@@ -62,7 +62,7 @@ Listen to all JS logs at all levels and register callbacks to process the log.
6262
{{< tabpane text=true >}}
6363
{{< tab header="Java" >}}
6464
{{< badge-version version="4.8" >}}
65-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L52-L59" >}}
65+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}}
6666
{{< /tab >}}
6767
{{< tab header="Ruby" >}}
6868
{{< badge-code >}}

website_and_docs/content/documentation/webdriver/bidi/w3c/log.pt-br.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Listen to the `console.log` events and register callbacks to process the event.
2222
{{< tabpane text=true >}}
2323
{{< tab header="Java" >}}
2424
{{< badge-version version="4.8" >}}
25-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L31-L38" >}}
25+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}}
2626
{{< /tab >}}
2727
{{< tab header="Ruby" >}}
2828
{{< badge-code >}}
@@ -42,7 +42,7 @@ and register callbacks to process the exception details.
4242

4343
{{< tabpane text=true >}}
4444
{{< tab header="Java" >}}
45-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L70-L77" >}}
45+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}}
4646
{{< /tab >}}
4747
{{< tab header="Ruby" >}}
4848
{{< badge-code >}}
@@ -62,7 +62,7 @@ Listen to all JS logs at all levels and register callbacks to process the log.
6262
{{< tabpane text=true >}}
6363
{{< tab header="Java" >}}
6464
{{< badge-version version="4.8" >}}
65-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L52-L59" >}}
65+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}}
6666
{{< /tab >}}
6767
{{< tab header="Ruby" >}}
6868
{{< badge-code >}}

website_and_docs/content/documentation/webdriver/bidi/w3c/log.zh-cn.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Listen to the `console.log` events and register callbacks to process the event.
2222

2323
{{< tabpane text=true >}}
2424
{{< tab header="Java" >}}
25-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L31-L38" >}}
25+
{{< badge-version version="4.8" >}}
26+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}}
2627
{{< /tab >}}
2728
{{< tab header="Ruby" >}}
2829
{{< badge-code >}}
2930
{{< /tab >}}
3031
{{< tab header="JavaScript" >}}
31-
{{< badge-version version="4.8" >}}
3232
{{< gh-codeblock path="/examples/javascript/test/bidirectional/logInspector.spec.js#L23-37" >}}
3333
{{< /tab >}}
3434
{{< tab header="Kotlin" >}}
@@ -43,13 +43,12 @@ and register callbacks to process the exception details.
4343

4444
{{< tabpane text=true >}}
4545
{{< tab header="Java" >}}
46-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L70-L77" >}}
46+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}}
4747
{{< /tab >}}
4848
{{< tab header="Ruby" >}}
4949
{{< badge-code >}}
5050
{{< /tab >}}
5151
{{< tab header="JavaScript" >}}
52-
{{< badge-version version="4.8" >}}
5352
{{< gh-codeblock path="/examples/javascript/test/bidirectional/logInspector.spec.js#L44-54" >}}
5453
{{< /tab >}}
5554
{{< tab header="Kotlin" >}}
@@ -63,7 +62,8 @@ Listen to all JS logs at all levels and register callbacks to process the log.
6362

6463
{{< tabpane text=true >}}
6564
{{< tab header="Java" >}}
66-
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L52-L59" >}}
65+
{{< badge-version version="4.8" >}}
66+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}}
6767
{{< /tab >}}
6868
{{< tab header="Ruby" >}}
6969
{{< badge-code >}}

0 commit comments

Comments
 (0)