selenium-devtools 0.0.1.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/selenium/devtools/v88.rb +1 -0
- data/lib/selenium/devtools/v88/accessibility.rb +73 -0
- data/lib/selenium/devtools/v88/animation.rb +100 -0
- data/lib/selenium/devtools/v88/application_cache.rb +66 -0
- data/lib/selenium/devtools/v88/audits.rb +63 -0
- data/lib/selenium/devtools/v88/background_service.rb +69 -0
- data/lib/selenium/devtools/v88/browser.rb +130 -0
- data/lib/selenium/devtools/v88/cache_storage.rb +75 -0
- data/lib/selenium/devtools/v88/cast.rb +72 -0
- data/lib/selenium/devtools/v88/console.rb +59 -0
- data/lib/selenium/devtools/v88/css.rb +181 -0
- data/lib/selenium/devtools/v88/database.rb +66 -0
- data/lib/selenium/devtools/v88/debugger.rb +233 -0
- data/lib/selenium/devtools/v88/device_orientation.rb +55 -0
- data/lib/selenium/devtools/v88/dom.rb +329 -0
- data/lib/selenium/devtools/v88/dom_debugger.rb +95 -0
- data/lib/selenium/devtools/v88/dom_snapshot.rb +67 -0
- data/lib/selenium/devtools/v88/dom_storage.rb +81 -0
- data/lib/selenium/devtools/v88/emulation.rb +198 -0
- data/lib/selenium/devtools/v88/fetch.rb +99 -0
- data/lib/selenium/devtools/v88/headless_experimental.rb +63 -0
- data/lib/selenium/devtools/v88/heap_profiler.rb +109 -0
- data/lib/selenium/devtools/v88/indexed_db.rb +102 -0
- data/lib/selenium/devtools/v88/input.rb +148 -0
- data/lib/selenium/devtools/v88/inspector.rb +57 -0
- data/lib/selenium/devtools/v88/io.rb +61 -0
- data/lib/selenium/devtools/v88/layer_tree.rb +97 -0
- data/lib/selenium/devtools/v88/log.rb +68 -0
- data/lib/selenium/devtools/v88/media.rb +59 -0
- data/lib/selenium/devtools/v88/memory.rb +88 -0
- data/lib/selenium/devtools/v88/network.rb +247 -0
- data/lib/selenium/devtools/v88/overlay.rb +183 -0
- data/lib/selenium/devtools/v88/page.rb +376 -0
- data/lib/selenium/devtools/v88/performance.rb +65 -0
- data/lib/selenium/devtools/v88/profiler.rb +125 -0
- data/lib/selenium/devtools/v88/runtime.rb +197 -0
- data/lib/selenium/devtools/v88/schema.rb +48 -0
- data/lib/selenium/devtools/v88/security.rb +73 -0
- data/lib/selenium/devtools/v88/service_worker.rb +118 -0
- data/lib/selenium/devtools/v88/storage.rb +103 -0
- data/lib/selenium/devtools/v88/system_info.rb +52 -0
- data/lib/selenium/devtools/v88/target.rb +145 -0
- data/lib/selenium/devtools/v88/tethering.rb +57 -0
- data/lib/selenium/devtools/v88/tracing.rb +79 -0
- data/lib/selenium/devtools/v88/web_audio.rb +72 -0
- data/lib/selenium/devtools/v88/web_authn.rb +102 -0
- data/lib/selenium/devtools/version.rb +24 -0
- metadata +99 -0
@@ -0,0 +1,63 @@
|
|
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 headless_experimental
|
25
|
+
@headless_experimental ||= V88::HeadlessExperimental.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V88
|
29
|
+
class HeadlessExperimental
|
30
|
+
EVENTS = {
|
31
|
+
needs_begin_frames_changed: 'needsBeginFramesChanged',
|
32
|
+
}.freeze
|
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["HeadlessExperimental.#{event}"] << block
|
41
|
+
end
|
42
|
+
|
43
|
+
def begin_frame(frame_time_ticks: nil, interval: nil, no_display_updates: nil, screenshot: nil)
|
44
|
+
@devtools.send_cmd('HeadlessExperimental.beginFrame',
|
45
|
+
frameTimeTicks: frame_time_ticks,
|
46
|
+
interval: interval,
|
47
|
+
noDisplayUpdates: no_display_updates,
|
48
|
+
screenshot: screenshot)
|
49
|
+
end
|
50
|
+
|
51
|
+
def disable
|
52
|
+
@devtools.send_cmd('HeadlessExperimental.disable')
|
53
|
+
end
|
54
|
+
|
55
|
+
def enable
|
56
|
+
@devtools.send_cmd('HeadlessExperimental.enable')
|
57
|
+
end
|
58
|
+
|
59
|
+
end # V88
|
60
|
+
end # HeadlessExperimental
|
61
|
+
end # DevTools
|
62
|
+
end # WebDriver
|
63
|
+
end # Selenium
|
@@ -0,0 +1,109 @@
|
|
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 heap_profiler
|
25
|
+
@heap_profiler ||= V88::HeapProfiler.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V88
|
29
|
+
class HeapProfiler
|
30
|
+
EVENTS = {
|
31
|
+
add_heap_snapshot_chunk: 'addHeapSnapshotChunk',
|
32
|
+
heap_stats_update: 'heapStatsUpdate',
|
33
|
+
last_seen_object_id: 'lastSeenObjectId',
|
34
|
+
report_heap_snapshot_progress: 'reportHeapSnapshotProgress',
|
35
|
+
reset_profiles: 'resetProfiles',
|
36
|
+
}.freeze
|
37
|
+
|
38
|
+
def initialize(devtools)
|
39
|
+
@devtools = devtools
|
40
|
+
end
|
41
|
+
|
42
|
+
def on(event, &block)
|
43
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
44
|
+
@devtools.callbacks["HeapProfiler.#{event}"] << block
|
45
|
+
end
|
46
|
+
|
47
|
+
def add_inspected_heap_object(heap_object_id:)
|
48
|
+
@devtools.send_cmd('HeapProfiler.addInspectedHeapObject',
|
49
|
+
heapObjectId: heap_object_id)
|
50
|
+
end
|
51
|
+
|
52
|
+
def collect_garbage
|
53
|
+
@devtools.send_cmd('HeapProfiler.collectGarbage')
|
54
|
+
end
|
55
|
+
|
56
|
+
def disable
|
57
|
+
@devtools.send_cmd('HeapProfiler.disable')
|
58
|
+
end
|
59
|
+
|
60
|
+
def enable
|
61
|
+
@devtools.send_cmd('HeapProfiler.enable')
|
62
|
+
end
|
63
|
+
|
64
|
+
def get_heap_object_id(object_id:)
|
65
|
+
@devtools.send_cmd('HeapProfiler.getHeapObjectId',
|
66
|
+
objectId: object_id)
|
67
|
+
end
|
68
|
+
|
69
|
+
def get_object_by_heap_object_id(object_id:, object_group: nil)
|
70
|
+
@devtools.send_cmd('HeapProfiler.getObjectByHeapObjectId',
|
71
|
+
objectId: object_id,
|
72
|
+
objectGroup: object_group)
|
73
|
+
end
|
74
|
+
|
75
|
+
def get_sampling_profile
|
76
|
+
@devtools.send_cmd('HeapProfiler.getSamplingProfile')
|
77
|
+
end
|
78
|
+
|
79
|
+
def start_sampling(sampling_interval: nil)
|
80
|
+
@devtools.send_cmd('HeapProfiler.startSampling',
|
81
|
+
samplingInterval: sampling_interval)
|
82
|
+
end
|
83
|
+
|
84
|
+
def start_tracking_heap_objects(track_allocations: nil)
|
85
|
+
@devtools.send_cmd('HeapProfiler.startTrackingHeapObjects',
|
86
|
+
trackAllocations: track_allocations)
|
87
|
+
end
|
88
|
+
|
89
|
+
def stop_sampling
|
90
|
+
@devtools.send_cmd('HeapProfiler.stopSampling')
|
91
|
+
end
|
92
|
+
|
93
|
+
def stop_tracking_heap_objects(report_progress: nil, treat_global_objects_as_roots: nil)
|
94
|
+
@devtools.send_cmd('HeapProfiler.stopTrackingHeapObjects',
|
95
|
+
reportProgress: report_progress,
|
96
|
+
treatGlobalObjectsAsRoots: treat_global_objects_as_roots)
|
97
|
+
end
|
98
|
+
|
99
|
+
def take_heap_snapshot(report_progress: nil, treat_global_objects_as_roots: nil)
|
100
|
+
@devtools.send_cmd('HeapProfiler.takeHeapSnapshot',
|
101
|
+
reportProgress: report_progress,
|
102
|
+
treatGlobalObjectsAsRoots: treat_global_objects_as_roots)
|
103
|
+
end
|
104
|
+
|
105
|
+
end # V88
|
106
|
+
end # HeapProfiler
|
107
|
+
end # DevTools
|
108
|
+
end # WebDriver
|
109
|
+
end # Selenium
|
@@ -0,0 +1,102 @@
|
|
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 indexed_db
|
25
|
+
@indexed_db ||= V88::IndexedDB.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V88
|
29
|
+
class IndexedDB
|
30
|
+
|
31
|
+
def initialize(devtools)
|
32
|
+
@devtools = devtools
|
33
|
+
end
|
34
|
+
|
35
|
+
def on(event, &block)
|
36
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
37
|
+
@devtools.callbacks["IndexedDB.#{event}"] << block
|
38
|
+
end
|
39
|
+
|
40
|
+
def clear_object_store(security_origin:, database_name:, object_store_name:)
|
41
|
+
@devtools.send_cmd('IndexedDB.clearObjectStore',
|
42
|
+
securityOrigin: security_origin,
|
43
|
+
databaseName: database_name,
|
44
|
+
objectStoreName: object_store_name)
|
45
|
+
end
|
46
|
+
|
47
|
+
def delete_database(security_origin:, database_name:)
|
48
|
+
@devtools.send_cmd('IndexedDB.deleteDatabase',
|
49
|
+
securityOrigin: security_origin,
|
50
|
+
databaseName: database_name)
|
51
|
+
end
|
52
|
+
|
53
|
+
def delete_object_store_entries(security_origin:, database_name:, object_store_name:, key_range:)
|
54
|
+
@devtools.send_cmd('IndexedDB.deleteObjectStoreEntries',
|
55
|
+
securityOrigin: security_origin,
|
56
|
+
databaseName: database_name,
|
57
|
+
objectStoreName: object_store_name,
|
58
|
+
keyRange: key_range)
|
59
|
+
end
|
60
|
+
|
61
|
+
def disable
|
62
|
+
@devtools.send_cmd('IndexedDB.disable')
|
63
|
+
end
|
64
|
+
|
65
|
+
def enable
|
66
|
+
@devtools.send_cmd('IndexedDB.enable')
|
67
|
+
end
|
68
|
+
|
69
|
+
def request_data(security_origin:, database_name:, object_store_name:, index_name:, skip_count:, page_size:, key_range: nil)
|
70
|
+
@devtools.send_cmd('IndexedDB.requestData',
|
71
|
+
securityOrigin: security_origin,
|
72
|
+
databaseName: database_name,
|
73
|
+
objectStoreName: object_store_name,
|
74
|
+
indexName: index_name,
|
75
|
+
skipCount: skip_count,
|
76
|
+
pageSize: page_size,
|
77
|
+
keyRange: key_range)
|
78
|
+
end
|
79
|
+
|
80
|
+
def get_metadata(security_origin:, database_name:, object_store_name:)
|
81
|
+
@devtools.send_cmd('IndexedDB.getMetadata',
|
82
|
+
securityOrigin: security_origin,
|
83
|
+
databaseName: database_name,
|
84
|
+
objectStoreName: object_store_name)
|
85
|
+
end
|
86
|
+
|
87
|
+
def request_database(security_origin:, database_name:)
|
88
|
+
@devtools.send_cmd('IndexedDB.requestDatabase',
|
89
|
+
securityOrigin: security_origin,
|
90
|
+
databaseName: database_name)
|
91
|
+
end
|
92
|
+
|
93
|
+
def request_database_names(security_origin:)
|
94
|
+
@devtools.send_cmd('IndexedDB.requestDatabaseNames',
|
95
|
+
securityOrigin: security_origin)
|
96
|
+
end
|
97
|
+
|
98
|
+
end # V88
|
99
|
+
end # IndexedDB
|
100
|
+
end # DevTools
|
101
|
+
end # WebDriver
|
102
|
+
end # Selenium
|
@@ -0,0 +1,148 @@
|
|
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 input
|
25
|
+
@input ||= V88::Input.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V88
|
29
|
+
class Input
|
30
|
+
|
31
|
+
def initialize(devtools)
|
32
|
+
@devtools = devtools
|
33
|
+
end
|
34
|
+
|
35
|
+
def on(event, &block)
|
36
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
37
|
+
@devtools.callbacks["Input.#{event}"] << block
|
38
|
+
end
|
39
|
+
|
40
|
+
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)
|
41
|
+
@devtools.send_cmd('Input.dispatchKeyEvent',
|
42
|
+
type: type,
|
43
|
+
modifiers: modifiers,
|
44
|
+
timestamp: timestamp,
|
45
|
+
text: text,
|
46
|
+
unmodifiedText: unmodified_text,
|
47
|
+
keyIdentifier: key_identifier,
|
48
|
+
code: code,
|
49
|
+
key: key,
|
50
|
+
windowsVirtualKeyCode: windows_virtual_key_code,
|
51
|
+
nativeVirtualKeyCode: native_virtual_key_code,
|
52
|
+
autoRepeat: auto_repeat,
|
53
|
+
isKeypad: is_keypad,
|
54
|
+
isSystemKey: is_system_key,
|
55
|
+
location: location,
|
56
|
+
commands: commands)
|
57
|
+
end
|
58
|
+
|
59
|
+
def insert_text(text:)
|
60
|
+
@devtools.send_cmd('Input.insertText',
|
61
|
+
text: text)
|
62
|
+
end
|
63
|
+
|
64
|
+
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)
|
65
|
+
@devtools.send_cmd('Input.dispatchMouseEvent',
|
66
|
+
type: type,
|
67
|
+
x: x,
|
68
|
+
y: y,
|
69
|
+
modifiers: modifiers,
|
70
|
+
timestamp: timestamp,
|
71
|
+
button: button,
|
72
|
+
buttons: buttons,
|
73
|
+
clickCount: click_count,
|
74
|
+
force: force,
|
75
|
+
tangentialPressure: tangential_pressure,
|
76
|
+
tiltX: tilt_x,
|
77
|
+
tiltY: tilt_y,
|
78
|
+
twist: twist,
|
79
|
+
deltaX: delta_x,
|
80
|
+
deltaY: delta_y,
|
81
|
+
pointerType: pointer_type)
|
82
|
+
end
|
83
|
+
|
84
|
+
def dispatch_touch_event(type:, touch_points:, modifiers: nil, timestamp: nil)
|
85
|
+
@devtools.send_cmd('Input.dispatchTouchEvent',
|
86
|
+
type: type,
|
87
|
+
touchPoints: touch_points,
|
88
|
+
modifiers: modifiers,
|
89
|
+
timestamp: timestamp)
|
90
|
+
end
|
91
|
+
|
92
|
+
def emulate_touch_from_mouse_event(type:, x:, y:, button:, timestamp: nil, delta_x: nil, delta_y: nil, modifiers: nil, click_count: nil)
|
93
|
+
@devtools.send_cmd('Input.emulateTouchFromMouseEvent',
|
94
|
+
type: type,
|
95
|
+
x: x,
|
96
|
+
y: y,
|
97
|
+
button: button,
|
98
|
+
timestamp: timestamp,
|
99
|
+
deltaX: delta_x,
|
100
|
+
deltaY: delta_y,
|
101
|
+
modifiers: modifiers,
|
102
|
+
clickCount: click_count)
|
103
|
+
end
|
104
|
+
|
105
|
+
def set_ignore_input_events(ignore:)
|
106
|
+
@devtools.send_cmd('Input.setIgnoreInputEvents',
|
107
|
+
ignore: ignore)
|
108
|
+
end
|
109
|
+
|
110
|
+
def synthesize_pinch_gesture(x:, y:, scale_factor:, relative_speed: nil, gesture_source_type: nil)
|
111
|
+
@devtools.send_cmd('Input.synthesizePinchGesture',
|
112
|
+
x: x,
|
113
|
+
y: y,
|
114
|
+
scaleFactor: scale_factor,
|
115
|
+
relativeSpeed: relative_speed,
|
116
|
+
gestureSourceType: gesture_source_type)
|
117
|
+
end
|
118
|
+
|
119
|
+
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)
|
120
|
+
@devtools.send_cmd('Input.synthesizeScrollGesture',
|
121
|
+
x: x,
|
122
|
+
y: y,
|
123
|
+
xDistance: x_distance,
|
124
|
+
yDistance: y_distance,
|
125
|
+
xOverscroll: x_overscroll,
|
126
|
+
yOverscroll: y_overscroll,
|
127
|
+
preventFling: prevent_fling,
|
128
|
+
speed: speed,
|
129
|
+
gestureSourceType: gesture_source_type,
|
130
|
+
repeatCount: repeat_count,
|
131
|
+
repeatDelayMs: repeat_delay_ms,
|
132
|
+
interactionMarkerName: interaction_marker_name)
|
133
|
+
end
|
134
|
+
|
135
|
+
def synthesize_tap_gesture(x:, y:, duration: nil, tap_count: nil, gesture_source_type: nil)
|
136
|
+
@devtools.send_cmd('Input.synthesizeTapGesture',
|
137
|
+
x: x,
|
138
|
+
y: y,
|
139
|
+
duration: duration,
|
140
|
+
tapCount: tap_count,
|
141
|
+
gestureSourceType: gesture_source_type)
|
142
|
+
end
|
143
|
+
|
144
|
+
end # V88
|
145
|
+
end # Input
|
146
|
+
end # DevTools
|
147
|
+
end # WebDriver
|
148
|
+
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 inspector
|
25
|
+
@inspector ||= V88::Inspector.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V88
|
29
|
+
class Inspector
|
30
|
+
EVENTS = {
|
31
|
+
detached: 'detached',
|
32
|
+
target_crashed: 'targetCrashed',
|
33
|
+
target_reloaded_after_crash: 'targetReloadedAfterCrash',
|
34
|
+
}.freeze
|
35
|
+
|
36
|
+
def initialize(devtools)
|
37
|
+
@devtools = devtools
|
38
|
+
end
|
39
|
+
|
40
|
+
def on(event, &block)
|
41
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
42
|
+
@devtools.callbacks["Inspector.#{event}"] << block
|
43
|
+
end
|
44
|
+
|
45
|
+
def disable
|
46
|
+
@devtools.send_cmd('Inspector.disable')
|
47
|
+
end
|
48
|
+
|
49
|
+
def enable
|
50
|
+
@devtools.send_cmd('Inspector.enable')
|
51
|
+
end
|
52
|
+
|
53
|
+
end # V88
|
54
|
+
end # Inspector
|
55
|
+
end # DevTools
|
56
|
+
end # WebDriver
|
57
|
+
end # Selenium
|