Skip to content

Commit 03e46ff

Browse files
committed
WIP - docsy formatting got harder than it needs to be
1 parent 4a5bb09 commit 03e46ff

File tree

1 file changed

+120
-123
lines changed

1 file changed

+120
-123
lines changed

website_and_docs/content/documentation/webdriver/drivers/http_client.en.md

+120-123
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ with a driver or the grid.
1616
Here's a brief explanation of the default setup in each language:
1717

1818
{{< tabpane text=true langEqualsHeader=true >}}
19-
{{< tab header="Java" >}}
20-
**background**
19+
{{% tab header="Java" %}}
20+
**Background**
2121

2222
The default client has changed several times (Apache http client; OkHttp; currently it is Async HTTP Library).
2323
We are moving to the standard Java library, but the features Selenium requires were not added to the standard library until Java 11,
@@ -27,30 +27,31 @@ We describe this here, but we should summarize it for the documentation rather t
2727
because people care about the "what" more than they "why"
2828
https://www.selenium.dev/blog/2022/using-java11-httpclient/
2929

30-
**configuration**
30+
\
31+
**Configuration**
3132

3233
Rather than having users adjust the http client settings with system properties, Java created a `ClientConfig` class
3334
for Selenium 4.0.
34-
{{< /tab >}}
35-
{{< tab header="Python" >}}
35+
{{% /tab %}}
36+
{{% tab header="Python" %}}
3637
Python switched from httplib to urllib3 to support asynchronous communication for CDP functionality.
3738
Settings affecting the http client have been supported in constructors of various classes as well as with class methods
3839
in the `RemoteConnection()` class itself.
39-
{{< /tab >}}
40-
{{< tab header="CSharp" >}}
40+
{{% /tab %}}
41+
{{% tab header="CSharp" %}}
4142
.NET switched from HttpWebRequest to the standard library HttpClient.
4243
Configuration is only possible for the timeout value which can be set in the driver constructor.
43-
{{< /tab >}}
44-
{{< tab header="Ruby" >}}
44+
{{% /tab %}}
45+
{{% tab header="Ruby" %}}
4546
Ruby has always used the standard http library.
4647
Rather than passing in a configuration, Ruby allows users to change behaviors by subclassing a provided wrapper class.
47-
{{< /tab >}}
48-
{{< tab header="JavaScript" >}}
48+
{{% /tab %}}
49+
{{% tab header="JavaScript" %}}
4950
Who can possibly understand the innerworkings of this language?
50-
{{< /tab >}}
51-
{{< tab header="Kotlin" >}}
51+
{{% /tab %}}
52+
{{% tab header="Kotlin" %}}
5253
Just do what Java does until told otherwise
53-
{{< /tab >}}
54+
{{% /tab %}}
5455
{{< /tabpane >}}
5556

5657

@@ -59,8 +60,8 @@ Just do what Java does until told otherwise
5960
HTTP Clients are more important for Remote Server connections so these examples will show how to use them with
6061
the Grid:
6162

62-
{{< tabpane text=true langEqualsHeader=true >}}
63-
{{< tab header="Java" >}}
63+
{{< tabpane langEqualsHeader=true >}}
64+
{{% tab text=true header="Java" %}}
6465
Java only supports setting cient config when using the RemoteWebDriverBuilder:
6566
```java
6667
ClientConfig config = ClientConfig.defaultConfig()
@@ -71,29 +72,25 @@ WebDriver driver = RemoteWebDriver
7172
.config(config)
7273
.build();
7374
```
74-
{{< /tab >}}
75+
{{% /tab %}}
7576
{{< tab header="Python" >}}
76-
```py
7777
config = ClientConfig()
7878
driver = webdriver.Remote(client_config: config)
79-
```
8079
{{< /tab >}}
81-
{{< tab header="CSharp" >}}
80+
{{% tab text=true header="CSharp" %}}
8281
{{< badge-implementation >}}
83-
{{< /tab >}}
82+
{{% /tab %}}
8483
{{< tab header="Ruby" >}}
85-
```rb
8684
http_client = Selenium::WebDriver::Remote::Http::Default.new
8785
options = Selenium::WebDriver::Options.chrome
8886
driver = Selenium::WebDriver.for :remote, options: chrome, http_client: http_client
89-
```
9087
{{< /tab >}}
91-
{{< tab header="JavaScript" >}}
88+
{{% tab text=true header="JavaScript" %}}
9289
{{< badge-implementation >}}
93-
{{< /tab >}}
94-
{{< tab header="Kotlin" >}}
90+
{{% /tab %}}
91+
{{% tab text=true header="Kotlin" %}}
9592
{{< badge-code >}}
96-
{{< /tab >}}
93+
{{% /tab %}}
9794
{{< /tabpane >}}
9895

9996

@@ -104,24 +101,24 @@ This setting can dramatically improve performance with SSL over remote connectio
104101
It is not recommended to change this.
105102

106103
{{< tabpane text=true langEqualsHeader=true >}}
107-
{{< tab header="Java" >}}
104+
{{% tab header="Java" %}}
108105
{{< badge-implementation >}}
109-
{{< /tab >}}
110-
{{< tab header="Python" >}}
106+
{{% /tab %}}
107+
{{% tab header="Python" %}}
111108
{{< badge-code >}}
112-
{{< /tab >}}
113-
{{< tab header="CSharp" >}}
109+
{{% /tab %}}
110+
{{% tab header="CSharp" %}}
114111
{{< badge-implementation >}}
115-
{{< /tab >}}
116-
{{< tab header="Ruby" >}}
112+
{{% /tab %}}
113+
{{% tab header="Ruby" %}}
117114
{{< badge-implementation >}}
118-
{{< /tab >}}
119-
{{< tab header="JavaScript" >}}
115+
{{% /tab %}}
116+
{{% tab header="JavaScript" %}}
120117
{{< badge-implementation >}}
121-
{{< /tab >}}
122-
{{< tab header="Kotlin" >}}
118+
{{% /tab %}}
119+
{{% tab header="Kotlin" %}}
123120
{{< badge-implementation >}}
124-
{{< /tab >}}
121+
{{% /tab %}}
125122
{{< /tabpane >}}
126123

127124
## Timeouts
@@ -136,24 +133,24 @@ applies the first time, if it is false it applies every time.
136133
The default value is: ???
137134

138135
{{< tabpane text=true langEqualsHeader=true >}}
139-
{{< tab header="Java" >}}
136+
{{% tab header="Java" %}}
140137
{{< badge-code >}}
141-
{{< /tab >}}
142-
{{< tab header="Python" >}}
138+
{{% /tab %}}
139+
{{% tab header="Python" %}}
143140
{{< badge-code >}}
144-
{{< /tab >}}
145-
{{< tab header="CSharp" >}}
141+
{{% /tab %}}
142+
{{% tab header="CSharp" %}}
146143
{{< badge-code >}}
147-
{{< /tab >}}
148-
{{< tab header="Ruby" >}}
144+
{{% /tab %}}
145+
{{% tab header="Ruby" %}}
149146
{{< badge-code >}}
150-
{{< /tab >}}
151-
{{< tab header="JavaScript" >}}
147+
{{% /tab %}}
148+
{{% tab header="JavaScript" %}}
152149
{{< badge-implementation >}}
153-
{{< /tab >}}
154-
{{< tab header="Kotlin" >}}
150+
{{% /tab %}}
151+
{{% tab header="Kotlin" %}}
155152
{{< badge-code >}}
156-
{{< /tab >}}
153+
{{% /tab %}}
157154
{{< /tabpane >}}
158155

159156
### Read
@@ -164,24 +161,24 @@ Read timeout should always be higher than these other timeouts.
164161
The default value in all bindings as of Selenium 4.11 is: 120 seconds
165162

166163
{{< tabpane text=true langEqualsHeader=true >}}
167-
{{< tab header="Java" >}}
164+
{{% tab header="Java" %}}
168165
{{< badge-code >}}
169-
{{< /tab >}}
170-
{{< tab header="Python" >}}
166+
{{% /tab %}}
167+
{{% tab header="Python" %}}
171168
{{< badge-code >}}
172-
{{< /tab >}}
173-
{{< tab header="CSharp" >}}
169+
{{% /tab %}}
170+
{{% tab header="CSharp" %}}
174171
{{< badge-code >}}
175-
{{< /tab >}}
176-
{{< tab header="Ruby" >}}
172+
{{% /tab %}}
173+
{{% tab header="Ruby" %}}
177174
{{< badge-code >}}
178-
{{< /tab >}}
179-
{{< tab header="JavaScript" >}}
175+
{{% /tab %}}
176+
{{% tab header="JavaScript" %}}
180177
{{< badge-implementation >}}
181-
{{< /tab >}}
182-
{{< tab header="Kotlin" >}}
178+
{{% /tab %}}
179+
{{% tab header="Kotlin" %}}
183180
{{< badge-code >}}
184-
{{< /tab >}}
181+
{{% /tab %}}
185182
{{< /tabpane >}}
186183

187184
## Max Redirects
@@ -190,24 +187,24 @@ This value represents how many of these redirects the client will allow before s
190187
The default value in all bindings as of Selenium 4.11 is: 20
191188

192189
{{< tabpane text=true langEqualsHeader=true >}}
193-
{{< tab header="Java" >}}
190+
{{% tab header="Java" %}}
194191
{{< badge-implementation >}}
195-
{{< /tab >}}
196-
{{< tab header="Python" >}}
192+
{{% /tab %}}
193+
{{% tab header="Python" %}}
197194
{{< badge-code >}}
198-
{{< /tab >}}
199-
{{< tab header="CSharp" >}}
195+
{{% /tab %}}
196+
{{% tab header="CSharp" %}}
200197
{{< badge-implementation >}}
201-
{{< /tab >}}
202-
{{< tab header="Ruby" >}}
198+
{{% /tab %}}
199+
{{% tab header="Ruby" %}}
203200
{{< badge-implementation >}}
204-
{{< /tab >}}
205-
{{< tab header="JavaScript" >}}
201+
{{% /tab %}}
202+
{{% tab header="JavaScript" %}}
206203
{{< badge-implementation >}}
207-
{{< /tab >}}
208-
{{< tab header="Kotlin" >}}
204+
{{% /tab %}}
205+
{{% tab header="Kotlin" %}}
209206
{{< badge-implementation >}}
210-
{{< /tab >}}
207+
{{% /tab %}}
211208
{{< /tabpane >}}
212209

213210

@@ -218,24 +215,24 @@ For routing network traffic going into the browser, you must set a proxy in the
218215
Note: the proxy required in Java is different from the proxy required in Options; does that make sense?
219216

220217
{{< tabpane text=true langEqualsHeader=true >}}
221-
{{< tab header="Java" >}}
218+
{{% tab header="Java" %}}
222219
{{< badge-code >}}
223-
{{< /tab >}}
224-
{{< tab header="Python" >}}
220+
{{% /tab %}}
221+
{{% tab header="Python" %}}
225222
{{< badge-code >}}
226-
{{< /tab >}}
227-
{{< tab header="CSharp" >}}
223+
{{% /tab %}}
224+
{{% tab header="CSharp" %}}
228225
{{< badge-implementation >}}
229-
{{< /tab >}}
230-
{{< tab header="Ruby" >}}
226+
{{% /tab %}}
227+
{{% tab header="Ruby" %}}
231228
{{< badge-code >}}
232-
{{< /tab >}}
233-
{{< tab header="JavaScript" >}}
229+
{{% /tab %}}
230+
{{% tab header="JavaScript" %}}
234231
{{< badge-implementation >}}
235-
{{< /tab >}}
236-
{{< tab header="Kotlin" >}}
232+
{{% /tab %}}
233+
{{% tab header="Kotlin" %}}
237234
{{< badge-code >}}
238-
{{< /tab >}}
235+
{{% /tab %}}
239236
{{< /tabpane >}}
240237

241238

@@ -244,72 +241,72 @@ Most bindings you would just add the username and password to the proxy in use,
244241
specified independently. Does this make sense?
245242

246243
{{< tabpane text=true langEqualsHeader=true >}}
247-
{{< tab header="Java" >}}
244+
{{% tab header="Java" %}}
248245
{{< badge-code >}}
249-
{{< /tab >}}
250-
{{< tab header="Python" >}}
246+
{{% /tab %}}
247+
{{% tab header="Python" %}}
251248
{{< badge-implementation >}}
252-
{{< /tab >}}
253-
{{< tab header="CSharp" >}}
249+
{{% /tab %}}
250+
{{% tab header="CSharp" %}}
254251
{{< badge-implementation >}}
255-
{{< /tab >}}
256-
{{< tab header="Ruby" >}}
252+
{{% /tab %}}
253+
{{% tab header="Ruby" %}}
257254
{{< badge-implementation >}}
258-
{{< /tab >}}
259-
{{< tab header="JavaScript" >}}
255+
{{% /tab %}}
256+
{{% tab header="JavaScript" %}}
260257
{{< badge-implementation >}}
261-
{{< /tab >}}
262-
{{< tab header="Kotlin" >}}
258+
{{% /tab %}}
259+
{{% tab header="Kotlin" %}}
263260
{{< badge-implementation >}}
264-
{{< /tab >}}
261+
{{% /tab %}}
265262
{{< /tabpane >}}
266263

267264

268265
## Certificate Path
269266
Python allows you to specify this. Do other bindings need it?
270267

271268
{{< tabpane text=true langEqualsHeader=true >}}
272-
{{< tab header="Java" >}}
269+
{{% tab header="Java" %}}
273270
{{< badge-implementation >}}
274-
{{< /tab >}}
275-
{{< tab header="Python" >}}
271+
{{% /tab %}}
272+
{{% tab header="Python" %}}
276273
{{< badge-code >}}
277-
{{< /tab >}}
278-
{{< tab header="CSharp" >}}
274+
{{% /tab %}}
275+
{{% tab header="CSharp" %}}
279276
{{< badge-implementation >}}
280-
{{< /tab >}}
281-
{{< tab header="Ruby" >}}
277+
{{% /tab %}}
278+
{{% tab header="Ruby" %}}
282279
{{< badge-implementation >}}
283-
{{< /tab >}}
284-
{{< tab header="JavaScript" >}}
280+
{{% /tab %}}
281+
{{% tab header="JavaScript" %}}
285282
{{< badge-implementation >}}
286-
{{< /tab >}}
287-
{{< tab header="Kotlin" >}}
283+
{{% /tab %}}
284+
{{% tab header="Kotlin" %}}
288285
{{< badge-implementation >}}
289-
{{< /tab >}}
286+
{{% /tab %}}
290287
{{< /tabpane >}}
291288

292289

293290
### Filters
294291
This is set in Java, but I have no idea what it does.
295292

296293
{{< tabpane text=true langEqualsHeader=true >}}
297-
{{< tab header="Java" >}}
294+
{{% tab header="Java" %}}
298295
{{< badge-code >}}
299-
{{< /tab >}}
300-
{{< tab header="Python" >}}
296+
{{% /tab %}}
297+
{{% tab header="Python" %}}
301298
{{< badge-implementation >}}
302-
{{< /tab >}}
303-
{{< tab header="CSharp" >}}
299+
{{% /tab %}}
300+
{{% tab header="CSharp" %}}
304301
{{< badge-implementation >}}
305-
{{< /tab >}}
306-
{{< tab header="Ruby" >}}
302+
{{% /tab %}}
303+
{{% tab header="Ruby" %}}
307304
{{< badge-implementation >}}
308-
{{< /tab >}}
309-
{{< tab header="JavaScript" >}}
305+
{{% /tab %}}
306+
{{% tab header="JavaScript" %}}
310307
{{< badge-implementation >}}
311-
{{< /tab >}}
312-
{{< tab header="Kotlin" >}}
308+
{{% /tab %}}
309+
{{% tab header="Kotlin" %}}
313310
{{< badge-implementation >}}
314-
{{< /tab >}}
311+
{{% /tab %}}
315312
{{< /tabpane >}}

0 commit comments

Comments
 (0)