selenium-devtools 0.96.0 → 0.97.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/NOTICE +1 -1
  4. data/lib/selenium/devtools/README.md +7 -0
  5. data/lib/selenium/devtools/{v94 → v97}/accessibility.rb +4 -3
  6. data/lib/selenium/devtools/{v94 → v97}/animation.rb +2 -2
  7. data/lib/selenium/devtools/{v93 → v97}/audits.rb +2 -2
  8. data/lib/selenium/devtools/{v93 → v97}/background_service.rb +2 -2
  9. data/lib/selenium/devtools/{v93 → v97}/browser.rb +2 -2
  10. data/lib/selenium/devtools/{v94 → v97}/cache_storage.rb +2 -2
  11. data/lib/selenium/devtools/{v94 → v97}/cast.rb +2 -2
  12. data/lib/selenium/devtools/{v94 → v97}/console.rb +2 -2
  13. data/lib/selenium/devtools/{v94 → v97}/css.rb +2 -2
  14. data/lib/selenium/devtools/{v93 → v97}/database.rb +2 -2
  15. data/lib/selenium/devtools/{v94 → v97}/debugger.rb +2 -2
  16. data/lib/selenium/devtools/{v94 → v97}/device_orientation.rb +2 -2
  17. data/lib/selenium/devtools/{v94 → v97}/dom.rb +2 -2
  18. data/lib/selenium/devtools/{v93 → v97}/dom_debugger.rb +2 -2
  19. data/lib/selenium/devtools/{v94 → v97}/dom_snapshot.rb +2 -2
  20. data/lib/selenium/devtools/{v93 → v97}/dom_storage.rb +2 -2
  21. data/lib/selenium/devtools/{v94 → v97}/emulation.rb +7 -2
  22. data/lib/selenium/devtools/{v93/console.rb → v97/event_breakpoints.rb} +11 -16
  23. data/lib/selenium/devtools/{v94 → v97}/fetch.rb +11 -2
  24. data/lib/selenium/devtools/{v94 → v97}/headless_experimental.rb +2 -2
  25. data/lib/selenium/devtools/{v93 → v97}/heap_profiler.rb +2 -2
  26. data/lib/selenium/devtools/{v93 → v97}/indexed_db.rb +2 -2
  27. data/lib/selenium/devtools/{v94 → v97}/input.rb +2 -2
  28. data/lib/selenium/devtools/{v93 → v97}/inspector.rb +2 -2
  29. data/lib/selenium/devtools/{v93 → v97}/io.rb +2 -2
  30. data/lib/selenium/devtools/{v93 → v97}/layer_tree.rb +2 -2
  31. data/lib/selenium/devtools/{v94 → v97}/log.rb +2 -2
  32. data/lib/selenium/devtools/{v94 → v97}/media.rb +2 -2
  33. data/lib/selenium/devtools/{v93 → v97}/memory.rb +2 -2
  34. data/lib/selenium/devtools/{v94 → v97}/network.rb +9 -2
  35. data/lib/selenium/devtools/{v93 → v97}/overlay.rb +7 -2
  36. data/lib/selenium/devtools/{v94 → v97}/page.rb +11 -7
  37. data/lib/selenium/devtools/{v93 → v97}/performance.rb +2 -2
  38. data/lib/selenium/devtools/{v94 → v97}/performance_timeline.rb +2 -2
  39. data/lib/selenium/devtools/{v93 → v97}/profiler.rb +2 -26
  40. data/lib/selenium/devtools/{v94 → v97}/runtime.rb +5 -4
  41. data/lib/selenium/devtools/{v94 → v97}/schema.rb +2 -2
  42. data/lib/selenium/devtools/{v93 → v97}/security.rb +2 -2
  43. data/lib/selenium/devtools/{v93 → v97}/service_worker.rb +2 -2
  44. data/lib/selenium/devtools/{v93 → v97}/storage.rb +2 -2
  45. data/lib/selenium/devtools/{v93 → v97}/system_info.rb +2 -2
  46. data/lib/selenium/devtools/{v93 → v97}/target.rb +8 -2
  47. data/lib/selenium/devtools/{v93 → v97}/tethering.rb +2 -2
  48. data/lib/selenium/devtools/{v93 → v97}/tracing.rb +2 -2
  49. data/lib/selenium/devtools/{v93 → v97}/web_audio.rb +2 -2
  50. data/lib/selenium/devtools/{v93 → v97}/web_authn.rb +2 -2
  51. data/lib/selenium/devtools/v97.rb +1 -0
  52. data/lib/selenium/devtools/version.rb +1 -1
  53. metadata +50 -96
  54. data/lib/selenium/devtools/v93/accessibility.rb +0 -73
  55. data/lib/selenium/devtools/v93/animation.rb +0 -94
  56. data/lib/selenium/devtools/v93/application_cache.rb +0 -60
  57. data/lib/selenium/devtools/v93/cache_storage.rb +0 -69
  58. data/lib/selenium/devtools/v93/cast.rb +0 -66
  59. data/lib/selenium/devtools/v93/css.rb +0 -182
  60. data/lib/selenium/devtools/v93/debugger.rb +0 -220
  61. data/lib/selenium/devtools/v93/device_orientation.rb +0 -49
  62. data/lib/selenium/devtools/v93/dom.rb +0 -329
  63. data/lib/selenium/devtools/v93/dom_snapshot.rb +0 -63
  64. data/lib/selenium/devtools/v93/emulation.rb +0 -192
  65. data/lib/selenium/devtools/v93/fetch.rb +0 -93
  66. data/lib/selenium/devtools/v93/headless_experimental.rb +0 -57
  67. data/lib/selenium/devtools/v93/input.rb +0 -159
  68. data/lib/selenium/devtools/v93/log.rb +0 -62
  69. data/lib/selenium/devtools/v93/media.rb +0 -53
  70. data/lib/selenium/devtools/v93/network.rb +0 -255
  71. data/lib/selenium/devtools/v93/page.rb +0 -384
  72. data/lib/selenium/devtools/v93/performance_timeline.rb +0 -46
  73. data/lib/selenium/devtools/v93/runtime.rb +0 -193
  74. data/lib/selenium/devtools/v93/schema.rb +0 -42
  75. data/lib/selenium/devtools/v93.rb +0 -1
  76. data/lib/selenium/devtools/v94/application_cache.rb +0 -60
  77. data/lib/selenium/devtools/v94/audits.rb +0 -62
  78. data/lib/selenium/devtools/v94/background_service.rb +0 -63
  79. data/lib/selenium/devtools/v94/browser.rb +0 -135
  80. data/lib/selenium/devtools/v94/database.rb +0 -60
  81. data/lib/selenium/devtools/v94/dom_debugger.rb +0 -94
  82. data/lib/selenium/devtools/v94/dom_storage.rb +0 -75
  83. data/lib/selenium/devtools/v94/heap_profiler.rb +0 -105
  84. data/lib/selenium/devtools/v94/indexed_db.rb +0 -96
  85. data/lib/selenium/devtools/v94/inspector.rb +0 -51
  86. data/lib/selenium/devtools/v94/io.rb +0 -55
  87. data/lib/selenium/devtools/v94/layer_tree.rb +0 -91
  88. data/lib/selenium/devtools/v94/memory.rb +0 -82
  89. data/lib/selenium/devtools/v94/overlay.rb +0 -197
  90. data/lib/selenium/devtools/v94/performance.rb +0 -59
  91. data/lib/selenium/devtools/v94/profiler.rb +0 -119
  92. data/lib/selenium/devtools/v94/security.rb +0 -67
  93. data/lib/selenium/devtools/v94/service_worker.rb +0 -112
  94. data/lib/selenium/devtools/v94/storage.rb +0 -106
  95. data/lib/selenium/devtools/v94/system_info.rb +0 -46
  96. data/lib/selenium/devtools/v94/target.rb +0 -139
  97. data/lib/selenium/devtools/v94/tethering.rb +0 -51
  98. data/lib/selenium/devtools/v94/tracing.rb +0 -75
  99. data/lib/selenium/devtools/v94/web_audio.rb +0 -66
  100. data/lib/selenium/devtools/v94/web_authn.rb +0 -96
  101. data/lib/selenium/devtools/v94.rb +0 -1
@@ -1,93 +0,0 @@
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 DevTools
23
- module V93
24
- class Fetch
25
- EVENTS = {
26
- request_paused: 'requestPaused',
27
- auth_required: 'authRequired',
28
- }.freeze
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["Fetch.#{event}"] << block
37
- end
38
-
39
- def disable
40
- @devtools.send_cmd('Fetch.disable')
41
- end
42
-
43
- def enable(patterns: nil, handle_auth_requests: nil)
44
- @devtools.send_cmd('Fetch.enable',
45
- patterns: patterns,
46
- handleAuthRequests: handle_auth_requests)
47
- end
48
-
49
- def fail_request(request_id:, error_reason:)
50
- @devtools.send_cmd('Fetch.failRequest',
51
- requestId: request_id,
52
- errorReason: error_reason)
53
- end
54
-
55
- def fulfill_request(request_id:, response_code:, response_headers: nil, binary_response_headers: nil, body: nil, response_phrase: nil)
56
- @devtools.send_cmd('Fetch.fulfillRequest',
57
- requestId: request_id,
58
- responseCode: response_code,
59
- responseHeaders: response_headers,
60
- binaryResponseHeaders: binary_response_headers,
61
- body: body,
62
- responsePhrase: response_phrase)
63
- end
64
-
65
- def continue_request(request_id:, url: nil, method: nil, post_data: nil, headers: nil)
66
- @devtools.send_cmd('Fetch.continueRequest',
67
- requestId: request_id,
68
- url: url,
69
- method: method,
70
- postData: post_data,
71
- headers: headers)
72
- end
73
-
74
- def continue_with_auth(request_id:, auth_challenge_response:)
75
- @devtools.send_cmd('Fetch.continueWithAuth',
76
- requestId: request_id,
77
- authChallengeResponse: auth_challenge_response)
78
- end
79
-
80
- def get_response_body(request_id:)
81
- @devtools.send_cmd('Fetch.getResponseBody',
82
- requestId: request_id)
83
- end
84
-
85
- def take_response_body_as_stream(request_id:)
86
- @devtools.send_cmd('Fetch.takeResponseBodyAsStream',
87
- requestId: request_id)
88
- end
89
-
90
- end # Fetch
91
- end # V93
92
- end # DevTools
93
- end # Selenium
@@ -1,57 +0,0 @@
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 DevTools
23
- module V93
24
- class HeadlessExperimental
25
- EVENTS = {
26
- needs_begin_frames_changed: 'needsBeginFramesChanged',
27
- }.freeze
28
-
29
- def initialize(devtools)
30
- @devtools = devtools
31
- end
32
-
33
- def on(event, &block)
34
- event = EVENTS[event] if event.is_a?(Symbol)
35
- @devtools.callbacks["HeadlessExperimental.#{event}"] << block
36
- end
37
-
38
- def begin_frame(frame_time_ticks: nil, interval: nil, no_display_updates: nil, screenshot: nil)
39
- @devtools.send_cmd('HeadlessExperimental.beginFrame',
40
- frameTimeTicks: frame_time_ticks,
41
- interval: interval,
42
- noDisplayUpdates: no_display_updates,
43
- screenshot: screenshot)
44
- end
45
-
46
- def disable
47
- @devtools.send_cmd('HeadlessExperimental.disable')
48
- end
49
-
50
- def enable
51
- @devtools.send_cmd('HeadlessExperimental.enable')
52
- end
53
-
54
- end # HeadlessExperimental
55
- end # V93
56
- end # DevTools
57
- end # Selenium
@@ -1,159 +0,0 @@
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 DevTools
23
- module V93
24
- class Input
25
- EVENTS = {
26
- drag_intercepted: 'dragIntercepted',
27
- }.freeze
28
-
29
- def initialize(devtools)
30
- @devtools = devtools
31
- end
32
-
33
- def on(event, &block)
34
- event = EVENTS[event] if event.is_a?(Symbol)
35
- @devtools.callbacks["Input.#{event}"] << block
36
- end
37
-
38
- def dispatch_drag_event(type:, x:, y:, data:, modifiers: nil)
39
- @devtools.send_cmd('Input.dispatchDragEvent',
40
- type: type,
41
- x: x,
42
- y: y,
43
- data: data,
44
- modifiers: modifiers)
45
- end
46
-
47
- def dispatch_key_event(type:, modifiers: nil, timestamp: nil, text: nil, unmodified_text: nil, key_identifier: nil, code: nil, key: nil, windows_virtual_key_code: nil, native_virtual_key_code: nil, auto_repeat: nil, is_keypad: nil, is_system_key: nil, location: nil, commands: nil)
48
- @devtools.send_cmd('Input.dispatchKeyEvent',
49
- type: type,
50
- modifiers: modifiers,
51
- timestamp: timestamp,
52
- text: text,
53
- unmodifiedText: unmodified_text,
54
- keyIdentifier: key_identifier,
55
- code: code,
56
- key: key,
57
- windowsVirtualKeyCode: windows_virtual_key_code,
58
- nativeVirtualKeyCode: native_virtual_key_code,
59
- autoRepeat: auto_repeat,
60
- isKeypad: is_keypad,
61
- isSystemKey: is_system_key,
62
- location: location,
63
- commands: commands)
64
- end
65
-
66
- def insert_text(text:)
67
- @devtools.send_cmd('Input.insertText',
68
- text: text)
69
- end
70
-
71
- def dispatch_mouse_event(type:, x:, y:, modifiers: nil, timestamp: nil, button: nil, buttons: nil, click_count: nil, force: nil, tangential_pressure: nil, tilt_x: nil, tilt_y: nil, twist: nil, delta_x: nil, delta_y: nil, pointer_type: nil)
72
- @devtools.send_cmd('Input.dispatchMouseEvent',
73
- type: type,
74
- x: x,
75
- y: y,
76
- modifiers: modifiers,
77
- timestamp: timestamp,
78
- button: button,
79
- buttons: buttons,
80
- clickCount: click_count,
81
- force: force,
82
- tangentialPressure: tangential_pressure,
83
- tiltX: tilt_x,
84
- tiltY: tilt_y,
85
- twist: twist,
86
- deltaX: delta_x,
87
- deltaY: delta_y,
88
- pointerType: pointer_type)
89
- end
90
-
91
- def dispatch_touch_event(type:, touch_points:, modifiers: nil, timestamp: nil)
92
- @devtools.send_cmd('Input.dispatchTouchEvent',
93
- type: type,
94
- touchPoints: touch_points,
95
- modifiers: modifiers,
96
- timestamp: timestamp)
97
- end
98
-
99
- def emulate_touch_from_mouse_event(type:, x:, y:, button:, timestamp: nil, delta_x: nil, delta_y: nil, modifiers: nil, click_count: nil)
100
- @devtools.send_cmd('Input.emulateTouchFromMouseEvent',
101
- type: type,
102
- x: x,
103
- y: y,
104
- button: button,
105
- timestamp: timestamp,
106
- deltaX: delta_x,
107
- deltaY: delta_y,
108
- modifiers: modifiers,
109
- clickCount: click_count)
110
- end
111
-
112
- def set_ignore_input_events(ignore:)
113
- @devtools.send_cmd('Input.setIgnoreInputEvents',
114
- ignore: ignore)
115
- end
116
-
117
- def set_intercept_drags(enabled:)
118
- @devtools.send_cmd('Input.setInterceptDrags',
119
- enabled: enabled)
120
- end
121
-
122
- def synthesize_pinch_gesture(x:, y:, scale_factor:, relative_speed: nil, gesture_source_type: nil)
123
- @devtools.send_cmd('Input.synthesizePinchGesture',
124
- x: x,
125
- y: y,
126
- scaleFactor: scale_factor,
127
- relativeSpeed: relative_speed,
128
- gestureSourceType: gesture_source_type)
129
- end
130
-
131
- def synthesize_scroll_gesture(x:, y:, x_distance: nil, y_distance: nil, x_overscroll: nil, y_overscroll: nil, prevent_fling: nil, speed: nil, gesture_source_type: nil, repeat_count: nil, repeat_delay_ms: nil, interaction_marker_name: nil)
132
- @devtools.send_cmd('Input.synthesizeScrollGesture',
133
- x: x,
134
- y: y,
135
- xDistance: x_distance,
136
- yDistance: y_distance,
137
- xOverscroll: x_overscroll,
138
- yOverscroll: y_overscroll,
139
- preventFling: prevent_fling,
140
- speed: speed,
141
- gestureSourceType: gesture_source_type,
142
- repeatCount: repeat_count,
143
- repeatDelayMs: repeat_delay_ms,
144
- interactionMarkerName: interaction_marker_name)
145
- end
146
-
147
- def synthesize_tap_gesture(x:, y:, duration: nil, tap_count: nil, gesture_source_type: nil)
148
- @devtools.send_cmd('Input.synthesizeTapGesture',
149
- x: x,
150
- y: y,
151
- duration: duration,
152
- tapCount: tap_count,
153
- gestureSourceType: gesture_source_type)
154
- end
155
-
156
- end # Input
157
- end # V93
158
- end # DevTools
159
- end # Selenium
@@ -1,62 +0,0 @@
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 DevTools
23
- module V93
24
- class Log
25
- EVENTS = {
26
- entry_added: 'entryAdded',
27
- }.freeze
28
-
29
- def initialize(devtools)
30
- @devtools = devtools
31
- end
32
-
33
- def on(event, &block)
34
- event = EVENTS[event] if event.is_a?(Symbol)
35
- @devtools.callbacks["Log.#{event}"] << block
36
- end
37
-
38
- def clear
39
- @devtools.send_cmd('Log.clear')
40
- end
41
-
42
- def disable
43
- @devtools.send_cmd('Log.disable')
44
- end
45
-
46
- def enable
47
- @devtools.send_cmd('Log.enable')
48
- end
49
-
50
- def start_violations_report(config:)
51
- @devtools.send_cmd('Log.startViolationsReport',
52
- config: config)
53
- end
54
-
55
- def stop_violations_report
56
- @devtools.send_cmd('Log.stopViolationsReport')
57
- end
58
-
59
- end # Log
60
- end # V93
61
- end # DevTools
62
- end # Selenium
@@ -1,53 +0,0 @@
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 DevTools
23
- module V93
24
- class Media
25
- EVENTS = {
26
- player_properties_changed: 'playerPropertiesChanged',
27
- player_events_added: 'playerEventsAdded',
28
- player_messages_logged: 'playerMessagesLogged',
29
- player_errors_raised: 'playerErrorsRaised',
30
- players_created: 'playersCreated',
31
- }.freeze
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["Media.#{event}"] << block
40
- end
41
-
42
- def enable
43
- @devtools.send_cmd('Media.enable')
44
- end
45
-
46
- def disable
47
- @devtools.send_cmd('Media.disable')
48
- end
49
-
50
- end # Media
51
- end # V93
52
- end # DevTools
53
- end # Selenium
@@ -1,255 +0,0 @@
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 DevTools
23
- module V93
24
- class Network
25
- EVENTS = {
26
- data_received: 'dataReceived',
27
- event_source_message_received: 'eventSourceMessageReceived',
28
- loading_failed: 'loadingFailed',
29
- loading_finished: 'loadingFinished',
30
- request_intercepted: 'requestIntercepted',
31
- request_served_from_cache: 'requestServedFromCache',
32
- request_will_be_sent: 'requestWillBeSent',
33
- resource_changed_priority: 'resourceChangedPriority',
34
- signed_exchange_received: 'signedExchangeReceived',
35
- response_received: 'responseReceived',
36
- web_socket_closed: 'webSocketClosed',
37
- web_socket_created: 'webSocketCreated',
38
- web_socket_frame_error: 'webSocketFrameError',
39
- web_socket_frame_received: 'webSocketFrameReceived',
40
- web_socket_frame_sent: 'webSocketFrameSent',
41
- web_socket_handshake_response_received: 'webSocketHandshakeResponseReceived',
42
- web_socket_will_send_handshake_request: 'webSocketWillSendHandshakeRequest',
43
- web_transport_created: 'webTransportCreated',
44
- web_transport_connection_established: 'webTransportConnectionEstablished',
45
- web_transport_closed: 'webTransportClosed',
46
- request_will_be_sent_extra_info: 'requestWillBeSentExtraInfo',
47
- response_received_extra_info: 'responseReceivedExtraInfo',
48
- trust_token_operation_done: 'trustTokenOperationDone',
49
- subresource_web_bundle_metadata_received: 'subresourceWebBundleMetadataReceived',
50
- subresource_web_bundle_metadata_error: 'subresourceWebBundleMetadataError',
51
- subresource_web_bundle_inner_response_parsed: 'subresourceWebBundleInnerResponseParsed',
52
- subresource_web_bundle_inner_response_error: 'subresourceWebBundleInnerResponseError',
53
- }.freeze
54
-
55
- def initialize(devtools)
56
- @devtools = devtools
57
- end
58
-
59
- def on(event, &block)
60
- event = EVENTS[event] if event.is_a?(Symbol)
61
- @devtools.callbacks["Network.#{event}"] << block
62
- end
63
-
64
- def set_accepted_encodings(encodings:)
65
- @devtools.send_cmd('Network.setAcceptedEncodings',
66
- encodings: encodings)
67
- end
68
-
69
- def clear_accepted_encodings_override
70
- @devtools.send_cmd('Network.clearAcceptedEncodingsOverride')
71
- end
72
-
73
- def can_clear_browser_cache
74
- @devtools.send_cmd('Network.canClearBrowserCache')
75
- end
76
-
77
- def can_clear_browser_cookies
78
- @devtools.send_cmd('Network.canClearBrowserCookies')
79
- end
80
-
81
- def can_emulate_network_conditions
82
- @devtools.send_cmd('Network.canEmulateNetworkConditions')
83
- end
84
-
85
- def clear_browser_cache
86
- @devtools.send_cmd('Network.clearBrowserCache')
87
- end
88
-
89
- def clear_browser_cookies
90
- @devtools.send_cmd('Network.clearBrowserCookies')
91
- end
92
-
93
- 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)
94
- @devtools.send_cmd('Network.continueInterceptedRequest',
95
- interceptionId: interception_id,
96
- errorReason: error_reason,
97
- rawResponse: raw_response,
98
- url: url,
99
- method: method,
100
- postData: post_data,
101
- headers: headers,
102
- authChallengeResponse: auth_challenge_response)
103
- end
104
-
105
- def delete_cookies(name:, url: nil, domain: nil, path: nil)
106
- @devtools.send_cmd('Network.deleteCookies',
107
- name: name,
108
- url: url,
109
- domain: domain,
110
- path: path)
111
- end
112
-
113
- def disable
114
- @devtools.send_cmd('Network.disable')
115
- end
116
-
117
- def emulate_network_conditions(offline:, latency:, download_throughput:, upload_throughput:, connection_type: nil)
118
- @devtools.send_cmd('Network.emulateNetworkConditions',
119
- offline: offline,
120
- latency: latency,
121
- downloadThroughput: download_throughput,
122
- uploadThroughput: upload_throughput,
123
- connectionType: connection_type)
124
- end
125
-
126
- def enable(max_total_buffer_size: nil, max_resource_buffer_size: nil, max_post_data_size: nil)
127
- @devtools.send_cmd('Network.enable',
128
- maxTotalBufferSize: max_total_buffer_size,
129
- maxResourceBufferSize: max_resource_buffer_size,
130
- maxPostDataSize: max_post_data_size)
131
- end
132
-
133
- def get_all_cookies
134
- @devtools.send_cmd('Network.getAllCookies')
135
- end
136
-
137
- def get_certificate(origin:)
138
- @devtools.send_cmd('Network.getCertificate',
139
- origin: origin)
140
- end
141
-
142
- def get_cookies(urls: nil)
143
- @devtools.send_cmd('Network.getCookies',
144
- urls: urls)
145
- end
146
-
147
- def get_response_body(request_id:)
148
- @devtools.send_cmd('Network.getResponseBody',
149
- requestId: request_id)
150
- end
151
-
152
- def get_request_post_data(request_id:)
153
- @devtools.send_cmd('Network.getRequestPostData',
154
- requestId: request_id)
155
- end
156
-
157
- def get_response_body_for_interception(interception_id:)
158
- @devtools.send_cmd('Network.getResponseBodyForInterception',
159
- interceptionId: interception_id)
160
- end
161
-
162
- def take_response_body_for_interception_as_stream(interception_id:)
163
- @devtools.send_cmd('Network.takeResponseBodyForInterceptionAsStream',
164
- interceptionId: interception_id)
165
- end
166
-
167
- def replay_xhr(request_id:)
168
- @devtools.send_cmd('Network.replayXHR',
169
- requestId: request_id)
170
- end
171
-
172
- def search_in_response_body(request_id:, query:, case_sensitive: nil, is_regex: nil)
173
- @devtools.send_cmd('Network.searchInResponseBody',
174
- requestId: request_id,
175
- query: query,
176
- caseSensitive: case_sensitive,
177
- isRegex: is_regex)
178
- end
179
-
180
- def set_blocked_urls(urls:)
181
- @devtools.send_cmd('Network.setBlockedURLs',
182
- urls: urls)
183
- end
184
-
185
- def set_bypass_service_worker(bypass:)
186
- @devtools.send_cmd('Network.setBypassServiceWorker',
187
- bypass: bypass)
188
- end
189
-
190
- def set_cache_disabled(cache_disabled:)
191
- @devtools.send_cmd('Network.setCacheDisabled',
192
- cacheDisabled: cache_disabled)
193
- end
194
-
195
- def set_cookie(name:, value:, url: nil, domain: nil, path: nil, secure: nil, http_only: nil, same_site: nil, expires: nil, priority: nil, same_party: nil, source_scheme: nil, source_port: nil)
196
- @devtools.send_cmd('Network.setCookie',
197
- name: name,
198
- value: value,
199
- url: url,
200
- domain: domain,
201
- path: path,
202
- secure: secure,
203
- httpOnly: http_only,
204
- sameSite: same_site,
205
- expires: expires,
206
- priority: priority,
207
- sameParty: same_party,
208
- sourceScheme: source_scheme,
209
- sourcePort: source_port)
210
- end
211
-
212
- def set_cookies(cookies:)
213
- @devtools.send_cmd('Network.setCookies',
214
- cookies: cookies)
215
- end
216
-
217
- def set_extra_http_headers(headers:)
218
- @devtools.send_cmd('Network.setExtraHTTPHeaders',
219
- headers: headers)
220
- end
221
-
222
- def set_attach_debug_stack(enabled:)
223
- @devtools.send_cmd('Network.setAttachDebugStack',
224
- enabled: enabled)
225
- end
226
-
227
- def set_request_interception(patterns:)
228
- @devtools.send_cmd('Network.setRequestInterception',
229
- patterns: patterns)
230
- end
231
-
232
- def set_user_agent_override(user_agent:, accept_language: nil, platform: nil, user_agent_metadata: nil)
233
- @devtools.send_cmd('Network.setUserAgentOverride',
234
- userAgent: user_agent,
235
- acceptLanguage: accept_language,
236
- platform: platform,
237
- userAgentMetadata: user_agent_metadata)
238
- end
239
-
240
- def get_security_isolation_status(frame_id: nil)
241
- @devtools.send_cmd('Network.getSecurityIsolationStatus',
242
- frameId: frame_id)
243
- end
244
-
245
- def load_network_resource(frame_id:, url:, options:)
246
- @devtools.send_cmd('Network.loadNetworkResource',
247
- frameId: frame_id,
248
- url: url,
249
- options: options)
250
- end
251
-
252
- end # Network
253
- end # V93
254
- end # DevTools
255
- end # Selenium