Skip to content

Commit e5e3170

Browse files
pujaganiharsha509
andauthored
Add RemoteWebDriver BiDi doc in all languages (SeleniumHQ#1043)[deploy site]
* Add RemoteWebDriver CDP examples doc in all languages * Fix markdown error Co-authored-by: Sri Harsha <12621691+harsha509@users.noreply.github.com>
1 parent 4ebd9a1 commit e5e3170

File tree

4 files changed

+266
-0
lines changed

4 files changed

+266
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: "RemoteWebDriver BiDirectional API"
3+
linkTitle: "RemoteWebDriver BiDi API"
4+
weight: 1
5+
---
6+
7+
The following examples demonstrate how to leverage BiDi APIs with [Remote WebDriver](/documentation/webdriver/remote_webdriver/).
8+
9+
## Register Basic Auth
10+
11+
Some applications make use of browser authentication to secure pages.
12+
With Selenium, you can automate the input of basic auth credentials whenever they arise.
13+
14+
{{< tabpane disableCodeBlock=true >}}
15+
{{< tab header="Java" >}}
16+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L79-94" >}}
17+
{{< /tab >}}
18+
{{< /tabpane >}}
19+
20+
## Mutation Observation
21+
22+
Mutation Observation is the ability to capture events via
23+
WebDriver BiDi when there are DOM mutations on a specific
24+
element in the DOM.
25+
26+
{{< tabpane disableCodeBlock=true >}}
27+
{{< tab header="Java" >}}
28+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L111-133" >}}
29+
{{< /tab >}}
30+
{{< /tabpane >}}
31+
32+
## Listen to `console.log` events
33+
34+
Listen to the `console.log` events and register callbacks to process the event.
35+
36+
{{< tabpane disableCodeBlock=true >}}
37+
{{< tab header="Java" >}}
38+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L149-170" >}}
39+
{{< /tab >}}
40+
{{< /tabpane >}}
41+
42+
## Actions causing JS exceptions
43+
44+
{{< tabpane disableCodeBlock=true >}}
45+
{{< tab header="Java" >}}
46+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L179-185" >}}
47+
{{< /tab >}}
48+
{{< /tabpane >}}
49+
50+
## Network Interception
51+
52+
If you want to capture network events coming into the browser and you want manipulate them you are able to do
53+
it with the following examples.
54+
55+
{{< tabpane disableCodeBlock=true >}}
56+
{{< tab header="Java" >}}
57+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L201-214" >}}
58+
{{< /tab >}}
59+
{{< /tabpane >}}
60+
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: "RemoteWebDriver BiDirectional API"
3+
linkTitle: "RemoteWebDriver BiDi API"
4+
weight: 1
5+
---
6+
7+
{{% pageinfo color="warning" %}}
8+
<p class="lead">
9+
<i class="fas fa-language display-4"></i>
10+
Page being translated from English to Japanese.
11+
Do you speak Japanese? Help us to translate
12+
it by sending us pull requests!
13+
</p>
14+
{{% /pageinfo %}}
15+
16+
The following examples demonstrate how to leverage BiDi APIs with [Remote WebDriver](/documentation/webdriver/remote_webdriver/).
17+
18+
## Register Basic Auth
19+
20+
Some applications make use of browser authentication to secure pages.
21+
With Selenium, you can automate the input of basic auth credentials whenever they arise.
22+
23+
{{< tabpane disableCodeBlock=true >}}
24+
{{< tab header="Java" >}}
25+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L79-94" >}}
26+
{{< /tab >}}
27+
{{< /tabpane >}}
28+
29+
## Mutation Observation
30+
31+
Mutation Observation is the ability to capture events via
32+
WebDriver BiDi when there are DOM mutations on a specific
33+
element in the DOM.
34+
35+
{{< tabpane disableCodeBlock=true >}}
36+
{{< tab header="Java" >}}
37+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L111-133" >}}
38+
{{< /tab >}}
39+
{{< /tabpane >}}
40+
41+
## Listen to `console.log` events
42+
43+
Listen to the `console.log` events and register callbacks to process the event.
44+
45+
{{< tabpane disableCodeBlock=true >}}
46+
{{< tab header="Java" >}}
47+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L149-170" >}}
48+
{{< /tab >}}
49+
{{< /tabpane >}}
50+
51+
## Actions causing JS exceptions
52+
53+
{{< tabpane disableCodeBlock=true >}}
54+
{{< tab header="Java" >}}
55+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L179-185" >}}
56+
{{< /tab >}}
57+
{{< /tabpane >}}
58+
59+
## Network Interception
60+
61+
If you want to capture network events coming into the browser and you want manipulate them you are able to do
62+
it with the following examples.
63+
64+
{{< tabpane disableCodeBlock=true >}}
65+
{{< tab header="Java" >}}
66+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L201-214" >}}
67+
{{< /tab >}}
68+
{{< /tabpane >}}
69+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: "RemoteWebDriver BiDirectional API"
3+
linkTitle: "RemoteWebDriver BiDi API"
4+
weight: 1
5+
---
6+
{{% pageinfo color="warning" %}}
7+
<p class="lead">
8+
<i class="fas fa-language display-4"></i>
9+
Page being translated from
10+
English to Portuguese. Do you speak Portuguese? Help us to translate
11+
it by sending us pull requests!
12+
</p>
13+
{{% /pageinfo %}}
14+
15+
The following examples demonstrate how to leverage BiDi APIs with [Remote WebDriver](/documentation/webdriver/remote_webdriver/).
16+
17+
## Register Basic Auth
18+
19+
Some applications make use of browser authentication to secure pages.
20+
With Selenium, you can automate the input of basic auth credentials whenever they arise.
21+
22+
{{< tabpane disableCodeBlock=true >}}
23+
{{< tab header="Java" >}}
24+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L79-94" >}}
25+
{{< /tab >}}
26+
{{< /tabpane >}}
27+
28+
## Mutation Observation
29+
30+
Mutation Observation is the ability to capture events via
31+
WebDriver BiDi when there are DOM mutations on a specific
32+
element in the DOM.
33+
34+
{{< tabpane disableCodeBlock=true >}}
35+
{{< tab header="Java" >}}
36+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L111-133" >}}
37+
{{< /tab >}}
38+
{{< /tabpane >}}
39+
40+
## Listen to `console.log` events
41+
42+
Listen to the `console.log` events and register callbacks to process the event.
43+
44+
{{< tabpane disableCodeBlock=true >}}
45+
{{< tab header="Java" >}}
46+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L149-170" >}}
47+
{{< /tab >}}
48+
{{< /tabpane >}}
49+
50+
## Actions causing JS exceptions
51+
52+
{{< tabpane disableCodeBlock=true >}}
53+
{{< tab header="Java" >}}
54+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L179-185" >}}
55+
{{< /tab >}}
56+
{{< /tabpane >}}
57+
58+
## Network Interception
59+
60+
If you want to capture network events coming into the browser and you want manipulate them you are able to do
61+
it with the following examples.
62+
63+
{{< tabpane disableCodeBlock=true >}}
64+
{{< tab header="Java" >}}
65+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L201-214" >}}
66+
{{< /tab >}}
67+
{{< /tabpane >}}
68+
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: "RemoteWebDriver BiDirectional API"
3+
linkTitle: "RemoteWebDriver BiDi API"
4+
weight: 1
5+
---
6+
7+
{{% pageinfo color="warning" %}}
8+
<p class="lead">
9+
<i class="fas fa-language display-4"></i>
10+
Page being translated from
11+
English to Chinese. Do you speak Chinese? Help us to translate
12+
it by sending us pull requests!
13+
</p>
14+
{{% /pageinfo %}}
15+
16+
The following examples demonstrate how to leverage BiDi APIs with [Remote WebDriver](/documentation/webdriver/remote_webdriver/).
17+
18+
## Register Basic Auth
19+
20+
Some applications make use of browser authentication to secure pages.
21+
With Selenium, you can automate the input of basic auth credentials whenever they arise.
22+
23+
{{< tabpane disableCodeBlock=true >}}
24+
{{< tab header="Java" >}}
25+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L79-94" >}}
26+
{{< /tab >}}
27+
{{< /tabpane >}}
28+
29+
## Mutation Observation
30+
31+
Mutation Observation is the ability to capture events via
32+
WebDriver BiDi when there are DOM mutations on a specific
33+
element in the DOM.
34+
35+
{{< tabpane disableCodeBlock=true >}}
36+
{{< tab header="Java" >}}
37+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L111-133" >}}
38+
{{< /tab >}}
39+
{{< /tabpane >}}
40+
41+
## Listen to `console.log` events
42+
43+
Listen to the `console.log` events and register callbacks to process the event.
44+
45+
{{< tabpane disableCodeBlock=true >}}
46+
{{< tab header="Java" >}}
47+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L149-170" >}}
48+
{{< /tab >}}
49+
{{< /tabpane >}}
50+
51+
## Actions causing JS exceptions
52+
53+
{{< tabpane disableCodeBlock=true >}}
54+
{{< tab header="Java" >}}
55+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L179-185" >}}
56+
{{< /tab >}}
57+
{{< /tabpane >}}
58+
59+
## Network Interception
60+
61+
If you want to capture network events coming into the browser and you want manipulate them you are able to do
62+
it with the following examples.
63+
64+
{{< tabpane disableCodeBlock=true >}}
65+
{{< tab header="Java" >}}
66+
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L201-214" >}}
67+
{{< /tab >}}
68+
{{< /tabpane >}}
69+

0 commit comments

Comments
 (0)