Skip to content

Commit 1f4cdb1

Browse files
authored
Add Python tab references to BiDi W3C log docs (#2643)
* Add Python tab references to W3C BiDi log docs * Add Python tab references to translated BiDi log docs (zh-cn, pt-br, ja) * fix(gh-codeblock): hash full path+fragment for moadl id to prevent duplicate DOM ids when multiple snippers reference the same source file --------- Co-authored-by: Pallavi Sharma <write2pallavi@gmail.com> [deploy site]
1 parent 7275687 commit 1f4cdb1

5 files changed

Lines changed: 46 additions & 12 deletions

File tree

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ aliases: [
66
"/documentation/en/webdriver/bidirectional/bidirectional_w3c/log",
77
]
88
---
9-
10-
This section contains the APIs related to logging.
11-
9+
This section contains the APIs related to logging.
1210
## Console logs
13-
1411
Listen to the `console.log` events and register callbacks to process the event.
15-
1612
{{< tabpane text=true >}}
1713
{{< tab header="Java" >}}
1814
{{< badge-version version="4.8" >}}
1915
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}}
2016
{{< /tab >}}
17+
{{< tab header="Python" >}}
18+
{{< badge-version version="4.15" >}}
19+
{{< gh-codeblock path="/examples/python/tests/bidi/test_bidi_logging.py#L7-L15" >}}
20+
{{< /tab >}}
2121
{{< tab header="Ruby" >}}
2222
{{< badge-code >}}
2323
{{< /tab >}}
@@ -28,16 +28,17 @@ Listen to the `console.log` events and register callbacks to process the event.
2828
{{< badge-code >}}
2929
{{< /tab >}}
3030
{{< /tabpane >}}
31-
3231
## JavaScript exceptions
33-
3432
Listen to the JS Exceptions
3533
and register callbacks to process the exception details.
36-
3734
{{< tabpane text=true >}}
3835
{{< tab header="Java" >}}
3936
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}}
4037
{{< /tab >}}
38+
{{< tab header="Python" >}}
39+
{{< badge-version version="4.15" >}}
40+
{{< gh-codeblock path="/examples/python/tests/bidi/test_bidi_logging.py#L31-L39" >}}
41+
{{< /tab >}}
4142
{{< tab header="Ruby" >}}
4243
{{< badge-code >}}
4344
{{< /tab >}}
@@ -48,16 +49,16 @@ and register callbacks to process the exception details.
4849
{{< badge-code >}}
4950
{{< /tab >}}
5051
{{< /tabpane >}}
51-
5252
## Listen to JS Logs
53-
5453
Listen to all JS logs at all levels and register callbacks to process the log.
55-
5654
{{< tabpane text=true >}}
5755
{{< tab header="Java" >}}
5856
{{< badge-version version="4.8" >}}
5957
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}}
6058
{{< /tab >}}
59+
{{< tab header="Python" >}}
60+
{{< badge-code >}}
61+
{{< /tab >}}
6162
{{< tab header="Ruby" >}}
6263
{{< badge-code >}}
6364
{{< /tab >}}

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ Listen to the `console.log` events and register callbacks to process the event.
2424
{{< badge-version version="4.8" >}}
2525
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}}
2626
{{< /tab >}}
27+
{{< tab header="Python" >}}
28+
{{< badge-version version="4.15" >}}
29+
{{< gh-codeblock path="/examples/python/tests/bidi/test_bidi_logging.py#L7-L15" >}}
30+
{{< /tab >}}
2731
{{< tab header="Ruby" >}}
2832
{{< badge-code >}}
2933
{{< /tab >}}
@@ -44,6 +48,10 @@ and register callbacks to process the exception details.
4448
{{< tab header="Java" >}}
4549
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}}
4650
{{< /tab >}}
51+
{{< tab header="Python" >}}
52+
{{< badge-version version="4.15" >}}
53+
{{< gh-codeblock path="/examples/python/tests/bidi/test_bidi_logging.py#L31-L39" >}}
54+
{{< /tab >}}
4755
{{< tab header="Ruby" >}}
4856
{{< badge-code >}}
4957
{{< /tab >}}
@@ -64,6 +72,9 @@ Listen to all JS logs at all levels and register callbacks to process the log.
6472
{{< badge-version version="4.8" >}}
6573
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}}
6674
{{< /tab >}}
75+
{{< tab header="Python" >}}
76+
{{< badge-code >}}
77+
{{< /tab >}}
6778
{{< tab header="Ruby" >}}
6879
{{< badge-code >}}
6980
{{< /tab >}}

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ Listen to the `console.log` events and register callbacks to process the event.
2424
{{< badge-version version="4.8" >}}
2525
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}}
2626
{{< /tab >}}
27+
{{< tab header="Python" >}}
28+
{{< badge-version version="4.15" >}}
29+
{{< gh-codeblock path="/examples/python/tests/bidi/test_bidi_logging.py#L7-L15" >}}
30+
{{< /tab >}}
2731
{{< tab header="Ruby" >}}
2832
{{< badge-code >}}
2933
{{< /tab >}}
@@ -44,6 +48,10 @@ and register callbacks to process the exception details.
4448
{{< tab header="Java" >}}
4549
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}}
4650
{{< /tab >}}
51+
{{< tab header="Python" >}}
52+
{{< badge-version version="4.15" >}}
53+
{{< gh-codeblock path="/examples/python/tests/bidi/test_bidi_logging.py#L31-L39" >}}
54+
{{< /tab >}}
4755
{{< tab header="Ruby" >}}
4856
{{< badge-code >}}
4957
{{< /tab >}}
@@ -64,6 +72,9 @@ Listen to all JS logs at all levels and register callbacks to process the log.
6472
{{< badge-version version="4.8" >}}
6573
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}}
6674
{{< /tab >}}
75+
{{< tab header="Python" >}}
76+
{{< badge-code >}}
77+
{{< /tab >}}
6778
{{< tab header="Ruby" >}}
6879
{{< badge-code >}}
6980
{{< /tab >}}

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Listen to the `console.log` events and register callbacks to process the event.
2525
{{< badge-version version="4.8" >}}
2626
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}}
2727
{{< /tab >}}
28+
{{< tab header="Python" >}}
29+
{{< badge-version version="4.15" >}}
30+
{{< gh-codeblock path="/examples/python/tests/bidi/test_bidi_logging.py#L7-L15" >}}
31+
{{< /tab >}}
2832
{{< tab header="Ruby" >}}
2933
{{< badge-code >}}
3034
{{< /tab >}}
@@ -45,6 +49,10 @@ and register callbacks to process the exception details.
4549
{{< tab header="Java" >}}
4650
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}}
4751
{{< /tab >}}
52+
{{< tab header="Python" >}}
53+
{{< badge-version version="4.15" >}}
54+
{{< gh-codeblock path="/examples/python/tests/bidi/test_bidi_logging.py#L31-L39" >}}
55+
{{< /tab >}}
4856
{{< tab header="Ruby" >}}
4957
{{< badge-code >}}
5058
{{< /tab >}}
@@ -65,6 +73,9 @@ Listen to all JS logs at all levels and register callbacks to process the log.
6573
{{< badge-version version="4.8" >}}
6674
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}}
6775
{{< /tab >}}
76+
{{< tab header="Python" >}}
77+
{{< badge-code >}}
78+
{{< /tab >}}
6879
{{< tab header="Ruby" >}}
6980
{{< badge-code >}}
7081
{{< /tab >}}

website_and_docs/layouts/shortcodes/gh-codeblock.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
</style>
6161

6262
{{ if $hasFragment }}
63-
{{ $uniqueId := md5 $path }}
63+
{{ $uniqueId := md5 $fullPath }}
6464
<div class="mt-4 pb-2">
6565
<div style="border: 1px solid #dee2e6; border-radius: 6px; overflow: hidden; display: flex;">
6666
<a onclick="showCodeModal('{{ $uniqueId }}')" style="flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 12px; text-decoration: none; color: #007bff; background: #f8f9fa; font-weight: 500; transition: background-color 0.2s; cursor: pointer; border-right: 1px solid #dee2e6;" onmouseover="this.style.backgroundColor='#e9ecef'" onmouseout="this.style.backgroundColor='#f8f9fa'">

0 commit comments

Comments
 (0)