@@ -16,8 +16,8 @@ with a driver or the grid.
16
16
Here's a brief explanation of the default setup in each language:
17
17
18
18
{{< tabpane text=true langEqualsHeader=true >}}
19
- {{< tab header="Java" > }}
20
- ** background **
19
+ {{% tab header="Java" % }}
20
+ ** Background **
21
21
22
22
The default client has changed several times (Apache http client; OkHttp; currently it is Async HTTP Library).
23
23
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
27
27
because people care about the "what" more than they "why"
28
28
https://www.selenium.dev/blog/2022/using-java11-httpclient/
29
29
30
- ** configuration**
30
+ \
31
+ ** Configuration**
31
32
32
33
Rather than having users adjust the http client settings with system properties, Java created a ` ClientConfig ` class
33
34
for Selenium 4.0.
34
- {{< /tab > }}
35
- {{< tab header="Python" > }}
35
+ {{% /tab % }}
36
+ {{% tab header="Python" % }}
36
37
Python switched from httplib to urllib3 to support asynchronous communication for CDP functionality.
37
38
Settings affecting the http client have been supported in constructors of various classes as well as with class methods
38
39
in the ` RemoteConnection() ` class itself.
39
- {{< /tab > }}
40
- {{< tab header="CSharp" > }}
40
+ {{% /tab % }}
41
+ {{% tab header="CSharp" % }}
41
42
.NET switched from HttpWebRequest to the standard library HttpClient.
42
43
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" % }}
45
46
Ruby has always used the standard http library.
46
47
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" % }}
49
50
Who can possibly understand the innerworkings of this language?
50
- {{< /tab > }}
51
- {{< tab header="Kotlin" > }}
51
+ {{% /tab % }}
52
+ {{% tab header="Kotlin" % }}
52
53
Just do what Java does until told otherwise
53
- {{< /tab > }}
54
+ {{% /tab % }}
54
55
{{< /tabpane >}}
55
56
56
57
@@ -59,8 +60,8 @@ Just do what Java does until told otherwise
59
60
HTTP Clients are more important for Remote Server connections so these examples will show how to use them with
60
61
the Grid:
61
62
62
- {{< tabpane text=true langEqualsHeader=true >}}
63
- {{< tab header="Java" > }}
63
+ {{< tabpane langEqualsHeader=true >}}
64
+ {{% tab text=true header="Java" % }}
64
65
Java only supports setting cient config when using the RemoteWebDriverBuilder:
65
66
``` java
66
67
ClientConfig config = ClientConfig . defaultConfig()
@@ -71,29 +72,25 @@ WebDriver driver = RemoteWebDriver
71
72
.config(config)
72
73
.build();
73
74
```
74
- {{< /tab > }}
75
+ {{% /tab % }}
75
76
{{< tab header="Python" >}}
76
- ``` py
77
77
config = ClientConfig()
78
78
driver = webdriver.Remote(client_config: config)
79
- ```
80
79
{{< /tab >}}
81
- {{< tab header="CSharp" > }}
80
+ {{% tab text=true header="CSharp" % }}
82
81
{{< badge-implementation >}}
83
- {{< /tab > }}
82
+ {{% /tab % }}
84
83
{{< tab header="Ruby" >}}
85
- ``` rb
86
84
http_client = Selenium::WebDriver::Remote::Http::Default.new
87
85
options = Selenium::WebDriver::Options.chrome
88
86
driver = Selenium::WebDriver.for : remote , options: chrome, http_client: http_client
89
- ```
90
87
{{< /tab >}}
91
- {{< tab header="JavaScript" > }}
88
+ {{% tab text=true header="JavaScript" % }}
92
89
{{< badge-implementation >}}
93
- {{< /tab > }}
94
- {{< tab header="Kotlin" > }}
90
+ {{% /tab % }}
91
+ {{% tab text=true header="Kotlin" % }}
95
92
{{< badge-code >}}
96
- {{< /tab > }}
93
+ {{% /tab % }}
97
94
{{< /tabpane >}}
98
95
99
96
@@ -104,24 +101,24 @@ This setting can dramatically improve performance with SSL over remote connectio
104
101
It is not recommended to change this.
105
102
106
103
{{< tabpane text=true langEqualsHeader=true >}}
107
- {{< tab header="Java" > }}
104
+ {{% tab header="Java" % }}
108
105
{{< badge-implementation >}}
109
- {{< /tab > }}
110
- {{< tab header="Python" > }}
106
+ {{% /tab % }}
107
+ {{% tab header="Python" % }}
111
108
{{< badge-code >}}
112
- {{< /tab > }}
113
- {{< tab header="CSharp" > }}
109
+ {{% /tab % }}
110
+ {{% tab header="CSharp" % }}
114
111
{{< badge-implementation >}}
115
- {{< /tab > }}
116
- {{< tab header="Ruby" > }}
112
+ {{% /tab % }}
113
+ {{% tab header="Ruby" % }}
117
114
{{< badge-implementation >}}
118
- {{< /tab > }}
119
- {{< tab header="JavaScript" > }}
115
+ {{% /tab % }}
116
+ {{% tab header="JavaScript" % }}
120
117
{{< badge-implementation >}}
121
- {{< /tab > }}
122
- {{< tab header="Kotlin" > }}
118
+ {{% /tab % }}
119
+ {{% tab header="Kotlin" % }}
123
120
{{< badge-implementation >}}
124
- {{< /tab > }}
121
+ {{% /tab % }}
125
122
{{< /tabpane >}}
126
123
127
124
## Timeouts
@@ -136,24 +133,24 @@ applies the first time, if it is false it applies every time.
136
133
The default value is: ???
137
134
138
135
{{< tabpane text=true langEqualsHeader=true >}}
139
- {{< tab header="Java" > }}
136
+ {{% tab header="Java" % }}
140
137
{{< badge-code >}}
141
- {{< /tab > }}
142
- {{< tab header="Python" > }}
138
+ {{% /tab % }}
139
+ {{% tab header="Python" % }}
143
140
{{< badge-code >}}
144
- {{< /tab > }}
145
- {{< tab header="CSharp" > }}
141
+ {{% /tab % }}
142
+ {{% tab header="CSharp" % }}
146
143
{{< badge-code >}}
147
- {{< /tab > }}
148
- {{< tab header="Ruby" > }}
144
+ {{% /tab % }}
145
+ {{% tab header="Ruby" % }}
149
146
{{< badge-code >}}
150
- {{< /tab > }}
151
- {{< tab header="JavaScript" > }}
147
+ {{% /tab % }}
148
+ {{% tab header="JavaScript" % }}
152
149
{{< badge-implementation >}}
153
- {{< /tab > }}
154
- {{< tab header="Kotlin" > }}
150
+ {{% /tab % }}
151
+ {{% tab header="Kotlin" % }}
155
152
{{< badge-code >}}
156
- {{< /tab > }}
153
+ {{% /tab % }}
157
154
{{< /tabpane >}}
158
155
159
156
### Read
@@ -164,24 +161,24 @@ Read timeout should always be higher than these other timeouts.
164
161
The default value in all bindings as of Selenium 4.11 is: 120 seconds
165
162
166
163
{{< tabpane text=true langEqualsHeader=true >}}
167
- {{< tab header="Java" > }}
164
+ {{% tab header="Java" % }}
168
165
{{< badge-code >}}
169
- {{< /tab > }}
170
- {{< tab header="Python" > }}
166
+ {{% /tab % }}
167
+ {{% tab header="Python" % }}
171
168
{{< badge-code >}}
172
- {{< /tab > }}
173
- {{< tab header="CSharp" > }}
169
+ {{% /tab % }}
170
+ {{% tab header="CSharp" % }}
174
171
{{< badge-code >}}
175
- {{< /tab > }}
176
- {{< tab header="Ruby" > }}
172
+ {{% /tab % }}
173
+ {{% tab header="Ruby" % }}
177
174
{{< badge-code >}}
178
- {{< /tab > }}
179
- {{< tab header="JavaScript" > }}
175
+ {{% /tab % }}
176
+ {{% tab header="JavaScript" % }}
180
177
{{< badge-implementation >}}
181
- {{< /tab > }}
182
- {{< tab header="Kotlin" > }}
178
+ {{% /tab % }}
179
+ {{% tab header="Kotlin" % }}
183
180
{{< badge-code >}}
184
- {{< /tab > }}
181
+ {{% /tab % }}
185
182
{{< /tabpane >}}
186
183
187
184
## Max Redirects
@@ -190,24 +187,24 @@ This value represents how many of these redirects the client will allow before s
190
187
The default value in all bindings as of Selenium 4.11 is: 20
191
188
192
189
{{< tabpane text=true langEqualsHeader=true >}}
193
- {{< tab header="Java" > }}
190
+ {{% tab header="Java" % }}
194
191
{{< badge-implementation >}}
195
- {{< /tab > }}
196
- {{< tab header="Python" > }}
192
+ {{% /tab % }}
193
+ {{% tab header="Python" % }}
197
194
{{< badge-code >}}
198
- {{< /tab > }}
199
- {{< tab header="CSharp" > }}
195
+ {{% /tab % }}
196
+ {{% tab header="CSharp" % }}
200
197
{{< badge-implementation >}}
201
- {{< /tab > }}
202
- {{< tab header="Ruby" > }}
198
+ {{% /tab % }}
199
+ {{% tab header="Ruby" % }}
203
200
{{< badge-implementation >}}
204
- {{< /tab > }}
205
- {{< tab header="JavaScript" > }}
201
+ {{% /tab % }}
202
+ {{% tab header="JavaScript" % }}
206
203
{{< badge-implementation >}}
207
- {{< /tab > }}
208
- {{< tab header="Kotlin" > }}
204
+ {{% /tab % }}
205
+ {{% tab header="Kotlin" % }}
209
206
{{< badge-implementation >}}
210
- {{< /tab > }}
207
+ {{% /tab % }}
211
208
{{< /tabpane >}}
212
209
213
210
@@ -218,24 +215,24 @@ For routing network traffic going into the browser, you must set a proxy in the
218
215
Note: the proxy required in Java is different from the proxy required in Options; does that make sense?
219
216
220
217
{{< tabpane text=true langEqualsHeader=true >}}
221
- {{< tab header="Java" > }}
218
+ {{% tab header="Java" % }}
222
219
{{< badge-code >}}
223
- {{< /tab > }}
224
- {{< tab header="Python" > }}
220
+ {{% /tab % }}
221
+ {{% tab header="Python" % }}
225
222
{{< badge-code >}}
226
- {{< /tab > }}
227
- {{< tab header="CSharp" > }}
223
+ {{% /tab % }}
224
+ {{% tab header="CSharp" % }}
228
225
{{< badge-implementation >}}
229
- {{< /tab > }}
230
- {{< tab header="Ruby" > }}
226
+ {{% /tab % }}
227
+ {{% tab header="Ruby" % }}
231
228
{{< badge-code >}}
232
- {{< /tab > }}
233
- {{< tab header="JavaScript" > }}
229
+ {{% /tab % }}
230
+ {{% tab header="JavaScript" % }}
234
231
{{< badge-implementation >}}
235
- {{< /tab > }}
236
- {{< tab header="Kotlin" > }}
232
+ {{% /tab % }}
233
+ {{% tab header="Kotlin" % }}
237
234
{{< badge-code >}}
238
- {{< /tab > }}
235
+ {{% /tab % }}
239
236
{{< /tabpane >}}
240
237
241
238
@@ -244,72 +241,72 @@ Most bindings you would just add the username and password to the proxy in use,
244
241
specified independently. Does this make sense?
245
242
246
243
{{< tabpane text=true langEqualsHeader=true >}}
247
- {{< tab header="Java" > }}
244
+ {{% tab header="Java" % }}
248
245
{{< badge-code >}}
249
- {{< /tab > }}
250
- {{< tab header="Python" > }}
246
+ {{% /tab % }}
247
+ {{% tab header="Python" % }}
251
248
{{< badge-implementation >}}
252
- {{< /tab > }}
253
- {{< tab header="CSharp" > }}
249
+ {{% /tab % }}
250
+ {{% tab header="CSharp" % }}
254
251
{{< badge-implementation >}}
255
- {{< /tab > }}
256
- {{< tab header="Ruby" > }}
252
+ {{% /tab % }}
253
+ {{% tab header="Ruby" % }}
257
254
{{< badge-implementation >}}
258
- {{< /tab > }}
259
- {{< tab header="JavaScript" > }}
255
+ {{% /tab % }}
256
+ {{% tab header="JavaScript" % }}
260
257
{{< badge-implementation >}}
261
- {{< /tab > }}
262
- {{< tab header="Kotlin" > }}
258
+ {{% /tab % }}
259
+ {{% tab header="Kotlin" % }}
263
260
{{< badge-implementation >}}
264
- {{< /tab > }}
261
+ {{% /tab % }}
265
262
{{< /tabpane >}}
266
263
267
264
268
265
## Certificate Path
269
266
Python allows you to specify this. Do other bindings need it?
270
267
271
268
{{< tabpane text=true langEqualsHeader=true >}}
272
- {{< tab header="Java" > }}
269
+ {{% tab header="Java" % }}
273
270
{{< badge-implementation >}}
274
- {{< /tab > }}
275
- {{< tab header="Python" > }}
271
+ {{% /tab % }}
272
+ {{% tab header="Python" % }}
276
273
{{< badge-code >}}
277
- {{< /tab > }}
278
- {{< tab header="CSharp" > }}
274
+ {{% /tab % }}
275
+ {{% tab header="CSharp" % }}
279
276
{{< badge-implementation >}}
280
- {{< /tab > }}
281
- {{< tab header="Ruby" > }}
277
+ {{% /tab % }}
278
+ {{% tab header="Ruby" % }}
282
279
{{< badge-implementation >}}
283
- {{< /tab > }}
284
- {{< tab header="JavaScript" > }}
280
+ {{% /tab % }}
281
+ {{% tab header="JavaScript" % }}
285
282
{{< badge-implementation >}}
286
- {{< /tab > }}
287
- {{< tab header="Kotlin" > }}
283
+ {{% /tab % }}
284
+ {{% tab header="Kotlin" % }}
288
285
{{< badge-implementation >}}
289
- {{< /tab > }}
286
+ {{% /tab % }}
290
287
{{< /tabpane >}}
291
288
292
289
293
290
### Filters
294
291
This is set in Java, but I have no idea what it does.
295
292
296
293
{{< tabpane text=true langEqualsHeader=true >}}
297
- {{< tab header="Java" > }}
294
+ {{% tab header="Java" % }}
298
295
{{< badge-code >}}
299
- {{< /tab > }}
300
- {{< tab header="Python" > }}
296
+ {{% /tab % }}
297
+ {{% tab header="Python" % }}
301
298
{{< badge-implementation >}}
302
- {{< /tab > }}
303
- {{< tab header="CSharp" > }}
299
+ {{% /tab % }}
300
+ {{% tab header="CSharp" % }}
304
301
{{< badge-implementation >}}
305
- {{< /tab > }}
306
- {{< tab header="Ruby" > }}
302
+ {{% /tab % }}
303
+ {{% tab header="Ruby" % }}
307
304
{{< badge-implementation >}}
308
- {{< /tab > }}
309
- {{< tab header="JavaScript" > }}
305
+ {{% /tab % }}
306
+ {{% tab header="JavaScript" % }}
310
307
{{< badge-implementation >}}
311
- {{< /tab > }}
312
- {{< tab header="Kotlin" > }}
308
+ {{% /tab % }}
309
+ {{% tab header="Kotlin" % }}
313
310
{{< badge-implementation >}}
314
- {{< /tab > }}
311
+ {{% /tab % }}
315
312
{{< /tabpane >}}
0 commit comments