selenium-webdriver 4.0.0.alpha5 → 4.0.0.alpha6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +38 -0
  3. data/LICENSE +1 -1
  4. data/lib/selenium/webdriver/atoms/findElements.js +1 -1
  5. data/lib/selenium/webdriver/chrome/bridge.rb +4 -6
  6. data/lib/selenium/webdriver/chrome/driver.rb +4 -0
  7. data/lib/selenium/webdriver/chrome/options.rb +24 -19
  8. data/lib/selenium/webdriver/common.rb +1 -0
  9. data/lib/selenium/webdriver/common/driver.rb +55 -23
  10. data/lib/selenium/webdriver/common/logger.rb +1 -1
  11. data/lib/selenium/webdriver/common/manager.rb +5 -0
  12. data/lib/selenium/webdriver/common/options.rb +32 -9
  13. data/lib/selenium/webdriver/common/port_prober.rb +4 -6
  14. data/lib/selenium/webdriver/common/service.rb +12 -106
  15. data/lib/selenium/webdriver/common/service_manager.rb +151 -0
  16. data/lib/selenium/webdriver/devtools.rb +118 -0
  17. data/lib/selenium/webdriver/devtools/accessibility.rb +62 -0
  18. data/lib/selenium/webdriver/devtools/animation.rb +98 -0
  19. data/lib/selenium/webdriver/devtools/application_cache.rb +64 -0
  20. data/lib/selenium/webdriver/devtools/audits.rb +61 -0
  21. data/lib/selenium/webdriver/devtools/background_service.rb +67 -0
  22. data/lib/selenium/webdriver/devtools/browser.rb +123 -0
  23. data/lib/selenium/webdriver/devtools/cache_storage.rb +73 -0
  24. data/lib/selenium/webdriver/devtools/cast.rb +70 -0
  25. data/lib/selenium/webdriver/devtools/console.rb +57 -0
  26. data/lib/selenium/webdriver/devtools/css.rb +165 -0
  27. data/lib/selenium/webdriver/devtools/database.rb +64 -0
  28. data/lib/selenium/webdriver/devtools/debugger.rb +229 -0
  29. data/lib/selenium/webdriver/devtools/device_orientation.rb +53 -0
  30. data/lib/selenium/webdriver/devtools/dom.rb +320 -0
  31. data/lib/selenium/webdriver/devtools/domdebugger.rb +93 -0
  32. data/lib/selenium/webdriver/devtools/domsnapshot.rb +65 -0
  33. data/lib/selenium/webdriver/devtools/domstorage.rb +79 -0
  34. data/lib/selenium/webdriver/devtools/emulation.rb +180 -0
  35. data/lib/selenium/webdriver/devtools/fetch.rb +97 -0
  36. data/lib/selenium/webdriver/devtools/headless_experimental.rb +61 -0
  37. data/lib/selenium/webdriver/devtools/heap_profiler.rb +107 -0
  38. data/lib/selenium/webdriver/devtools/indexed_db.rb +100 -0
  39. data/lib/selenium/webdriver/devtools/input.rb +140 -0
  40. data/lib/selenium/webdriver/devtools/inspector.rb +55 -0
  41. data/lib/selenium/webdriver/devtools/io.rb +59 -0
  42. data/lib/selenium/webdriver/devtools/layer_tree.rb +95 -0
  43. data/lib/selenium/webdriver/devtools/log.rb +66 -0
  44. data/lib/selenium/webdriver/devtools/media.rb +57 -0
  45. data/lib/selenium/webdriver/devtools/memory.rb +86 -0
  46. data/lib/selenium/webdriver/devtools/network.rb +228 -0
  47. data/lib/selenium/webdriver/devtools/overlay.rb +157 -0
  48. data/lib/selenium/webdriver/devtools/page.rb +374 -0
  49. data/lib/selenium/webdriver/devtools/performance.rb +63 -0
  50. data/lib/selenium/webdriver/devtools/profiler.rb +111 -0
  51. data/lib/selenium/webdriver/devtools/runtime.rb +193 -0
  52. data/lib/selenium/webdriver/devtools/schema.rb +46 -0
  53. data/lib/selenium/webdriver/devtools/security.rb +71 -0
  54. data/lib/selenium/webdriver/devtools/service_worker.rb +116 -0
  55. data/lib/selenium/webdriver/devtools/storage.rb +95 -0
  56. data/lib/selenium/webdriver/devtools/system_info.rb +50 -0
  57. data/lib/selenium/webdriver/devtools/target.rb +141 -0
  58. data/lib/selenium/webdriver/devtools/tethering.rb +55 -0
  59. data/lib/selenium/webdriver/devtools/tracing.rb +76 -0
  60. data/lib/selenium/webdriver/devtools/web_audio.rb +70 -0
  61. data/lib/selenium/webdriver/devtools/web_authn.rb +94 -0
  62. data/lib/selenium/webdriver/edge_chrome/bridge.rb +9 -2
  63. data/lib/selenium/webdriver/edge_chrome/driver.rb +4 -0
  64. data/lib/selenium/webdriver/edge_chrome/options.rb +2 -0
  65. data/lib/selenium/webdriver/edge_html/options.rb +2 -9
  66. data/lib/selenium/webdriver/firefox/bridge.rb +1 -1
  67. data/lib/selenium/webdriver/firefox/driver.rb +4 -0
  68. data/lib/selenium/webdriver/firefox/options.rb +5 -10
  69. data/lib/selenium/webdriver/ie/options.rb +7 -10
  70. data/lib/selenium/webdriver/remote/bridge.rb +3 -13
  71. data/lib/selenium/webdriver/remote/capabilities.rb +11 -6
  72. data/lib/selenium/webdriver/safari/bridge.rb +1 -1
  73. data/lib/selenium/webdriver/safari/driver.rb +4 -0
  74. data/lib/selenium/webdriver/safari/options.rb +1 -8
  75. data/lib/selenium/webdriver/support/cdp_client_generator.rb +77 -0
  76. data/lib/selenium/webdriver/support/color.rb +2 -2
  77. data/lib/selenium/webdriver/version.rb +1 -1
  78. data/selenium-webdriver.gemspec +2 -2
  79. metadata +53 -5
@@ -0,0 +1,95 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed to the Software Freedom Conservancy (SFC) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The SFC licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+
20
+ # This file is automatically generated. Any changes will be lost!
21
+ module Selenium
22
+ module WebDriver
23
+ class DevTools
24
+ def layer_tree
25
+ @layer_tree ||= LayerTree.new(self)
26
+ end
27
+
28
+ class LayerTree
29
+ EVENTS = {
30
+ layer_painted: 'layerPainted',
31
+ layer_tree_did_change: 'layerTreeDidChange',
32
+ }
33
+
34
+ def initialize(devtools)
35
+ @devtools = devtools
36
+ end
37
+
38
+ def on(event, &block)
39
+ event = EVENTS[event] if event.is_a?(Symbol)
40
+ @devtools.callbacks["LayerTree.#{event}"] << block
41
+ end
42
+
43
+ def compositing_reasons(layer_id:)
44
+ @devtools.send_cmd('LayerTree.compositingReasons',
45
+ layerId: layer_id)
46
+ end
47
+
48
+ def disable
49
+ @devtools.send_cmd('LayerTree.disable')
50
+ end
51
+
52
+ def enable
53
+ @devtools.send_cmd('LayerTree.enable')
54
+ end
55
+
56
+ def load_snapshot(tiles:)
57
+ @devtools.send_cmd('LayerTree.loadSnapshot',
58
+ tiles: tiles)
59
+ end
60
+
61
+ def make_snapshot(layer_id:)
62
+ @devtools.send_cmd('LayerTree.makeSnapshot',
63
+ layerId: layer_id)
64
+ end
65
+
66
+ def profile_snapshot(snapshot_id:, min_repeat_count: nil, min_duration: nil, clip_rect: nil)
67
+ @devtools.send_cmd('LayerTree.profileSnapshot',
68
+ snapshotId: snapshot_id,
69
+ minRepeatCount: min_repeat_count,
70
+ minDuration: min_duration,
71
+ clipRect: clip_rect)
72
+ end
73
+
74
+ def release_snapshot(snapshot_id:)
75
+ @devtools.send_cmd('LayerTree.releaseSnapshot',
76
+ snapshotId: snapshot_id)
77
+ end
78
+
79
+ def replay_snapshot(snapshot_id:, from_step: nil, to_step: nil, scale: nil)
80
+ @devtools.send_cmd('LayerTree.replaySnapshot',
81
+ snapshotId: snapshot_id,
82
+ fromStep: from_step,
83
+ toStep: to_step,
84
+ scale: scale)
85
+ end
86
+
87
+ def snapshot_command_log(snapshot_id:)
88
+ @devtools.send_cmd('LayerTree.snapshotCommandLog',
89
+ snapshotId: snapshot_id)
90
+ end
91
+
92
+ end # LayerTree
93
+ end # DevTools
94
+ end # WebDriver
95
+ end # Selenium
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed to the Software Freedom Conservancy (SFC) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The SFC licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+
20
+ # This file is automatically generated. Any changes will be lost!
21
+ module Selenium
22
+ module WebDriver
23
+ class DevTools
24
+ def log
25
+ @log ||= Log.new(self)
26
+ end
27
+
28
+ class Log
29
+ EVENTS = {
30
+ entry_added: 'entryAdded',
31
+ }
32
+
33
+ def initialize(devtools)
34
+ @devtools = devtools
35
+ end
36
+
37
+ def on(event, &block)
38
+ event = EVENTS[event] if event.is_a?(Symbol)
39
+ @devtools.callbacks["Log.#{event}"] << block
40
+ end
41
+
42
+ def clear
43
+ @devtools.send_cmd('Log.clear')
44
+ end
45
+
46
+ def disable
47
+ @devtools.send_cmd('Log.disable')
48
+ end
49
+
50
+ def enable
51
+ @devtools.send_cmd('Log.enable')
52
+ end
53
+
54
+ def start_violations_report(config:)
55
+ @devtools.send_cmd('Log.startViolationsReport',
56
+ config: config)
57
+ end
58
+
59
+ def stop_violations_report
60
+ @devtools.send_cmd('Log.stopViolationsReport')
61
+ end
62
+
63
+ end # Log
64
+ end # DevTools
65
+ end # WebDriver
66
+ end # Selenium
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed to the Software Freedom Conservancy (SFC) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The SFC licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+
20
+ # This file is automatically generated. Any changes will be lost!
21
+ module Selenium
22
+ module WebDriver
23
+ class DevTools
24
+ def media
25
+ @media ||= Media.new(self)
26
+ end
27
+
28
+ class Media
29
+ EVENTS = {
30
+ player_properties_changed: 'playerPropertiesChanged',
31
+ player_events_added: 'playerEventsAdded',
32
+ player_messages_logged: 'playerMessagesLogged',
33
+ player_errors_raised: 'playerErrorsRaised',
34
+ players_created: 'playersCreated',
35
+ }
36
+
37
+ def initialize(devtools)
38
+ @devtools = devtools
39
+ end
40
+
41
+ def on(event, &block)
42
+ event = EVENTS[event] if event.is_a?(Symbol)
43
+ @devtools.callbacks["Media.#{event}"] << block
44
+ end
45
+
46
+ def enable
47
+ @devtools.send_cmd('Media.enable')
48
+ end
49
+
50
+ def disable
51
+ @devtools.send_cmd('Media.disable')
52
+ end
53
+
54
+ end # Media
55
+ end # DevTools
56
+ end # WebDriver
57
+ end # Selenium
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed to the Software Freedom Conservancy (SFC) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The SFC licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+
20
+ # This file is automatically generated. Any changes will be lost!
21
+ module Selenium
22
+ module WebDriver
23
+ class DevTools
24
+ def memory
25
+ @memory ||= Memory.new(self)
26
+ end
27
+
28
+ class Memory
29
+
30
+ def initialize(devtools)
31
+ @devtools = devtools
32
+ end
33
+
34
+ def on(event, &block)
35
+ event = EVENTS[event] if event.is_a?(Symbol)
36
+ @devtools.callbacks["Memory.#{event}"] << block
37
+ end
38
+
39
+ def get_domcounters
40
+ @devtools.send_cmd('Memory.getDOMCounters')
41
+ end
42
+
43
+ def prepare_for_leak_detection
44
+ @devtools.send_cmd('Memory.prepareForLeakDetection')
45
+ end
46
+
47
+ def forcibly_purge_java_script_memory
48
+ @devtools.send_cmd('Memory.forciblyPurgeJavaScriptMemory')
49
+ end
50
+
51
+ def set_pressure_notifications_suppressed(suppressed:)
52
+ @devtools.send_cmd('Memory.setPressureNotificationsSuppressed',
53
+ suppressed: suppressed)
54
+ end
55
+
56
+ def simulate_pressure_notification(level:)
57
+ @devtools.send_cmd('Memory.simulatePressureNotification',
58
+ level: level)
59
+ end
60
+
61
+ def start_sampling(sampling_interval: nil, suppress_randomness: nil)
62
+ @devtools.send_cmd('Memory.startSampling',
63
+ samplingInterval: sampling_interval,
64
+ suppressRandomness: suppress_randomness)
65
+ end
66
+
67
+ def stop_sampling
68
+ @devtools.send_cmd('Memory.stopSampling')
69
+ end
70
+
71
+ def get_all_time_sampling_profile
72
+ @devtools.send_cmd('Memory.getAllTimeSamplingProfile')
73
+ end
74
+
75
+ def get_browser_sampling_profile
76
+ @devtools.send_cmd('Memory.getBrowserSamplingProfile')
77
+ end
78
+
79
+ def get_sampling_profile
80
+ @devtools.send_cmd('Memory.getSamplingProfile')
81
+ end
82
+
83
+ end # Memory
84
+ end # DevTools
85
+ end # WebDriver
86
+ end # Selenium
@@ -0,0 +1,228 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed to the Software Freedom Conservancy (SFC) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The SFC licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+
20
+ # This file is automatically generated. Any changes will be lost!
21
+ module Selenium
22
+ module WebDriver
23
+ class DevTools
24
+ def network
25
+ @network ||= Network.new(self)
26
+ end
27
+
28
+ class Network
29
+ EVENTS = {
30
+ data_received: 'dataReceived',
31
+ event_source_message_received: 'eventSourceMessageReceived',
32
+ loading_failed: 'loadingFailed',
33
+ loading_finished: 'loadingFinished',
34
+ request_intercepted: 'requestIntercepted',
35
+ request_served_from_cache: 'requestServedFromCache',
36
+ request_will_be_sent: 'requestWillBeSent',
37
+ resource_changed_priority: 'resourceChangedPriority',
38
+ signed_exchange_received: 'signedExchangeReceived',
39
+ response_received: 'responseReceived',
40
+ web_socket_closed: 'webSocketClosed',
41
+ web_socket_created: 'webSocketCreated',
42
+ web_socket_frame_error: 'webSocketFrameError',
43
+ web_socket_frame_received: 'webSocketFrameReceived',
44
+ web_socket_frame_sent: 'webSocketFrameSent',
45
+ web_socket_handshake_response_received: 'webSocketHandshakeResponseReceived',
46
+ web_socket_will_send_handshake_request: 'webSocketWillSendHandshakeRequest',
47
+ request_will_be_sent_extra_info: 'requestWillBeSentExtraInfo',
48
+ response_received_extra_info: 'responseReceivedExtraInfo',
49
+ }
50
+
51
+ def initialize(devtools)
52
+ @devtools = devtools
53
+ end
54
+
55
+ def on(event, &block)
56
+ event = EVENTS[event] if event.is_a?(Symbol)
57
+ @devtools.callbacks["Network.#{event}"] << block
58
+ end
59
+
60
+ def can_clear_browser_cache
61
+ @devtools.send_cmd('Network.canClearBrowserCache')
62
+ end
63
+
64
+ def can_clear_browser_cookies
65
+ @devtools.send_cmd('Network.canClearBrowserCookies')
66
+ end
67
+
68
+ def can_emulate_network_conditions
69
+ @devtools.send_cmd('Network.canEmulateNetworkConditions')
70
+ end
71
+
72
+ def clear_browser_cache
73
+ @devtools.send_cmd('Network.clearBrowserCache')
74
+ end
75
+
76
+ def clear_browser_cookies
77
+ @devtools.send_cmd('Network.clearBrowserCookies')
78
+ end
79
+
80
+ def continue_intercepted_request(interception_id:, error_reason: nil, raw_response: nil, url: nil, method: nil, post_data: nil, headers: nil, auth_challenge_response: nil)
81
+ @devtools.send_cmd('Network.continueInterceptedRequest',
82
+ interceptionId: interception_id,
83
+ errorReason: error_reason,
84
+ rawResponse: raw_response,
85
+ url: url,
86
+ method: method,
87
+ postData: post_data,
88
+ headers: headers,
89
+ authChallengeResponse: auth_challenge_response)
90
+ end
91
+
92
+ def delete_cookies(name:, url: nil, domain: nil, path: nil)
93
+ @devtools.send_cmd('Network.deleteCookies',
94
+ name: name,
95
+ url: url,
96
+ domain: domain,
97
+ path: path)
98
+ end
99
+
100
+ def disable
101
+ @devtools.send_cmd('Network.disable')
102
+ end
103
+
104
+ def emulate_network_conditions(offline:, latency:, download_throughput:, upload_throughput:, connection_type: nil)
105
+ @devtools.send_cmd('Network.emulateNetworkConditions',
106
+ offline: offline,
107
+ latency: latency,
108
+ downloadThroughput: download_throughput,
109
+ uploadThroughput: upload_throughput,
110
+ connectionType: connection_type)
111
+ end
112
+
113
+ def enable(max_total_buffer_size: nil, max_resource_buffer_size: nil, max_post_data_size: nil)
114
+ @devtools.send_cmd('Network.enable',
115
+ maxTotalBufferSize: max_total_buffer_size,
116
+ maxResourceBufferSize: max_resource_buffer_size,
117
+ maxPostDataSize: max_post_data_size)
118
+ end
119
+
120
+ def get_all_cookies
121
+ @devtools.send_cmd('Network.getAllCookies')
122
+ end
123
+
124
+ def get_certificate(origin:)
125
+ @devtools.send_cmd('Network.getCertificate',
126
+ origin: origin)
127
+ end
128
+
129
+ def get_cookies(urls: nil)
130
+ @devtools.send_cmd('Network.getCookies',
131
+ urls: urls)
132
+ end
133
+
134
+ def get_response_body(request_id:)
135
+ @devtools.send_cmd('Network.getResponseBody',
136
+ requestId: request_id)
137
+ end
138
+
139
+ def get_request_post_data(request_id:)
140
+ @devtools.send_cmd('Network.getRequestPostData',
141
+ requestId: request_id)
142
+ end
143
+
144
+ def get_response_body_for_interception(interception_id:)
145
+ @devtools.send_cmd('Network.getResponseBodyForInterception',
146
+ interceptionId: interception_id)
147
+ end
148
+
149
+ def take_response_body_for_interception_as_stream(interception_id:)
150
+ @devtools.send_cmd('Network.takeResponseBodyForInterceptionAsStream',
151
+ interceptionId: interception_id)
152
+ end
153
+
154
+ def replay_xhr(request_id:)
155
+ @devtools.send_cmd('Network.replayXHR',
156
+ requestId: request_id)
157
+ end
158
+
159
+ def search_in_response_body(request_id:, query:, case_sensitive: nil, is_regex: nil)
160
+ @devtools.send_cmd('Network.searchInResponseBody',
161
+ requestId: request_id,
162
+ query: query,
163
+ caseSensitive: case_sensitive,
164
+ isRegex: is_regex)
165
+ end
166
+
167
+ def set_blocked_urls(urls:)
168
+ @devtools.send_cmd('Network.setBlockedURLs',
169
+ urls: urls)
170
+ end
171
+
172
+ def set_bypass_service_worker(bypass:)
173
+ @devtools.send_cmd('Network.setBypassServiceWorker',
174
+ bypass: bypass)
175
+ end
176
+
177
+ def set_cache_disabled(cache_disabled:)
178
+ @devtools.send_cmd('Network.setCacheDisabled',
179
+ cacheDisabled: cache_disabled)
180
+ end
181
+
182
+ def set_cookie(name:, value:, url: nil, domain: nil, path: nil, secure: nil, http_only: nil, same_site: nil, expires: nil, priority: nil)
183
+ @devtools.send_cmd('Network.setCookie',
184
+ name: name,
185
+ value: value,
186
+ url: url,
187
+ domain: domain,
188
+ path: path,
189
+ secure: secure,
190
+ httpOnly: http_only,
191
+ sameSite: same_site,
192
+ expires: expires,
193
+ priority: priority)
194
+ end
195
+
196
+ def set_cookies(cookies:)
197
+ @devtools.send_cmd('Network.setCookies',
198
+ cookies: cookies)
199
+ end
200
+
201
+ def set_data_size_limits_for_test(max_total_size:, max_resource_size:)
202
+ @devtools.send_cmd('Network.setDataSizeLimitsForTest',
203
+ maxTotalSize: max_total_size,
204
+ maxResourceSize: max_resource_size)
205
+ end
206
+
207
+ def set_extra_httpheaders(headers:)
208
+ @devtools.send_cmd('Network.setExtraHTTPHeaders',
209
+ headers: headers)
210
+ end
211
+
212
+ def set_request_interception(patterns:)
213
+ @devtools.send_cmd('Network.setRequestInterception',
214
+ patterns: patterns)
215
+ end
216
+
217
+ def set_user_agent_override(user_agent:, accept_language: nil, platform: nil, user_agent_metadata: nil)
218
+ @devtools.send_cmd('Network.setUserAgentOverride',
219
+ userAgent: user_agent,
220
+ acceptLanguage: accept_language,
221
+ platform: platform,
222
+ userAgentMetadata: user_agent_metadata)
223
+ end
224
+
225
+ end # Network
226
+ end # DevTools
227
+ end # WebDriver
228
+ end # Selenium