puppeteer-ruby 0.52.1 → 0.53.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.
- checksums.yaml +4 -4
- data/docs/api_coverage.md +16 -15
- data/lib/puppeteer/accessibility.rb +300 -0
- data/lib/puppeteer/browser.rb +107 -8
- data/lib/puppeteer/browser_connector.rb +1 -0
- data/lib/puppeteer/browser_context.rb +0 -1
- data/lib/puppeteer/cdp_session.rb +29 -8
- data/lib/puppeteer/chrome_target_manager.rb +145 -34
- data/lib/puppeteer/connection.rb +19 -0
- data/lib/puppeteer/coverage.rb +5 -0
- data/lib/puppeteer/css_coverage.rb +4 -0
- data/lib/puppeteer/dialog.rb +5 -0
- data/lib/puppeteer/element_handle.rb +2 -3
- data/lib/puppeteer/emulation_manager.rb +70 -9
- data/lib/puppeteer/events.rb +2 -0
- data/lib/puppeteer/execution_context.rb +7 -0
- data/lib/puppeteer/extension.rb +20 -6
- data/lib/puppeteer/frame.rb +7 -3
- data/lib/puppeteer/frame_manager.rb +71 -26
- data/lib/puppeteer/http_response.rb +15 -1
- data/lib/puppeteer/isolated_world.rb +10 -4
- data/lib/puppeteer/js_coverage.rb +4 -0
- data/lib/puppeteer/keyboard.rb +6 -0
- data/lib/puppeteer/launcher/browser_options.rb +13 -1
- data/lib/puppeteer/launcher/chrome.rb +48 -4
- data/lib/puppeteer/lifecycle_watcher.rb +1 -6
- data/lib/puppeteer/locators.rb +54 -26
- data/lib/puppeteer/mouse.rb +12 -24
- data/lib/puppeteer/network_manager.rb +16 -4
- data/lib/puppeteer/page.rb +259 -33
- data/lib/puppeteer/puppeteer.rb +6 -5
- data/lib/puppeteer/screen_recorder.rb +269 -0
- data/lib/puppeteer/target.rb +7 -3
- data/lib/puppeteer/touch_screen.rb +6 -0
- data/lib/puppeteer/tracing.rb +4 -0
- data/lib/puppeteer/version.rb +2 -2
- data/lib/puppeteer/wait_task.rb +1 -2
- data/lib/puppeteer/web_mcp.rb +227 -0
- data/lib/puppeteer/web_worker.rb +135 -9
- data/lib/puppeteer.rb +11 -1
- data/puppeteer-ruby.gemspec +1 -0
- data/sig/_supplementary.rbs +33 -1
- data/sig/puppeteer/accessibility.rbs +73 -0
- data/sig/puppeteer/browser.rbs +27 -3
- data/sig/puppeteer/cdp_session.rbs +4 -0
- data/sig/puppeteer/dialog.rbs +3 -0
- data/sig/puppeteer/element_handle.rbs +1 -2
- data/sig/puppeteer/execution_context.rbs +5 -0
- data/sig/puppeteer/extension.rbs +4 -0
- data/sig/puppeteer/frame.rbs +4 -2
- data/sig/puppeteer/http_response.rbs +4 -0
- data/sig/puppeteer/keyboard.rbs +4 -0
- data/sig/puppeteer/locators.rbs +3 -4
- data/sig/puppeteer/mouse.rbs +5 -6
- data/sig/puppeteer/page.rbs +48 -4
- data/sig/puppeteer/puppeteer.rbs +4 -5
- data/sig/puppeteer/screen_recorder.rbs +48 -0
- data/sig/puppeteer/touch_screen.rbs +4 -0
- data/sig/puppeteer/web_mcp.rbs +112 -0
- data/sig/puppeteer/web_worker.rbs +39 -0
- metadata +22 -2
data/sig/puppeteer/page.rbs
CHANGED
|
@@ -22,6 +22,16 @@ class Puppeteer::Page
|
|
|
22
22
|
# @rbs return: void -- No return value
|
|
23
23
|
def initialize: (Puppeteer::CDPSession client, Puppeteer::Target target, bool ignore_https_errors, ?network_enabled: bool) -> void
|
|
24
24
|
|
|
25
|
+
private def setup_primary_target_listeners: (untyped client) -> untyped
|
|
26
|
+
|
|
27
|
+
private def handle_activation: (untyped session) -> untyped
|
|
28
|
+
|
|
29
|
+
private def handle_secondary_target: (untyped session) -> untyped
|
|
30
|
+
|
|
31
|
+
private def mark_closed: () -> untyped
|
|
32
|
+
|
|
33
|
+
private def cleanup_page_listeners: () -> untyped
|
|
34
|
+
|
|
25
35
|
private def handle_detached_from_target: (untyped target) -> untyped
|
|
26
36
|
|
|
27
37
|
private def handle_attached_to_session: (untyped session) -> untyped
|
|
@@ -83,7 +93,10 @@ class Puppeteer::Page
|
|
|
83
93
|
def browser_context: () -> Puppeteer::BrowserContext
|
|
84
94
|
|
|
85
95
|
# @rbs return: bool -- Whether DevTools is attached to this page
|
|
86
|
-
def
|
|
96
|
+
def has_dev_tools: () -> bool
|
|
97
|
+
|
|
98
|
+
# @rbs return: Puppeteer::Page -- Existing or newly opened DevTools page
|
|
99
|
+
def open_dev_tools: () -> Puppeteer::Page
|
|
87
100
|
|
|
88
101
|
# @rbs extension: Puppeteer::Extension -- Extension to trigger
|
|
89
102
|
# @rbs return: void -- No return value
|
|
@@ -108,7 +121,10 @@ class Puppeteer::Page
|
|
|
108
121
|
|
|
109
122
|
attr_reader tracing: untyped
|
|
110
123
|
|
|
111
|
-
attr_reader
|
|
124
|
+
attr_reader webmcp: untyped
|
|
125
|
+
|
|
126
|
+
# @rbs return: Puppeteer::Accessibility -- Main-frame accessibility tree
|
|
127
|
+
def accessibility: () -> Puppeteer::Accessibility
|
|
112
128
|
|
|
113
129
|
# @rbs block: Proc? -- Optional block for instance_eval
|
|
114
130
|
# @rbs return: Puppeteer::Keyboard -- Keyboard instance
|
|
@@ -389,6 +405,10 @@ class Puppeteer::Page
|
|
|
389
405
|
# @rbs return: void -- No return value
|
|
390
406
|
def emulate_timezone: (String? timezone_id) -> void
|
|
391
407
|
|
|
408
|
+
# @rbs locale: String? -- Locale to emulate, or nil to disable emulation
|
|
409
|
+
# @rbs return: void -- No return value
|
|
410
|
+
def emulate_locale: (?String? locale) -> void
|
|
411
|
+
|
|
392
412
|
VISION_DEFICIENCY_TYPES: untyped
|
|
393
413
|
|
|
394
414
|
# @rbs vision_deficiency_type: String? -- Vision deficiency type
|
|
@@ -406,6 +426,31 @@ class Puppeteer::Page
|
|
|
406
426
|
|
|
407
427
|
attr_reader viewport: untyped
|
|
408
428
|
|
|
429
|
+
# @rbs path: String? -- Output file path
|
|
430
|
+
# @rbs overwrite: bool -- Overwrite an existing output file
|
|
431
|
+
# @rbs format: String? -- webm, gif, or mp4
|
|
432
|
+
# @rbs crop: Hash[Symbol, Numeric]? -- Viewport crop rectangle
|
|
433
|
+
# @rbs scale: Numeric? -- Output scale
|
|
434
|
+
# @rbs speed: Numeric? -- Playback speed
|
|
435
|
+
# @rbs fps: Numeric? -- Output frame rate
|
|
436
|
+
# @rbs loop: Numeric? -- GIF loop count
|
|
437
|
+
# @rbs delay: Numeric? -- GIF loop delay
|
|
438
|
+
# @rbs quality: Numeric? -- VP9 CRF value
|
|
439
|
+
# @rbs colors: Numeric? -- GIF palette size
|
|
440
|
+
# @rbs ffmpeg_path: String? -- FFmpeg executable path
|
|
441
|
+
# @rbs return: Puppeteer::ScreenRecorder -- Active recorder
|
|
442
|
+
def screencast: (?path: String?, ?overwrite: bool, ?format: String?, ?crop: Hash[Symbol, Numeric]?, ?scale: Numeric?, ?speed: Numeric?, ?fps: Numeric?, ?loop: Numeric?, ?delay: Numeric?, ?quality: Numeric?, ?colors: Numeric?, ?ffmpeg_path: String?) -> Puppeteer::ScreenRecorder
|
|
443
|
+
|
|
444
|
+
# @rbs return: void -- Start a shared CDP screencast session
|
|
445
|
+
def _start_screencast: () -> void
|
|
446
|
+
|
|
447
|
+
# @rbs return: void -- Stop a shared CDP screencast session
|
|
448
|
+
def _stop_screencast: () -> void
|
|
449
|
+
|
|
450
|
+
private def native_pixel_dimensions: () -> untyped
|
|
451
|
+
|
|
452
|
+
private def normalize_screencast_crop: (untyped crop, untyped width, untyped height, untyped device_pixel_ratio) -> untyped
|
|
453
|
+
|
|
409
454
|
# @rbs page_function: String -- page_function parameter
|
|
410
455
|
# @rbs args: Array[untyped] -- args parameter
|
|
411
456
|
# @rbs return: untyped -- Result
|
|
@@ -486,10 +531,9 @@ class Puppeteer::Page
|
|
|
486
531
|
# @rbs selector: String -- CSS selector
|
|
487
532
|
# @rbs delay: Numeric? -- Delay between down and up (ms)
|
|
488
533
|
# @rbs button: String? -- Mouse button
|
|
489
|
-
# @rbs click_count: Integer? -- Deprecated: use count (click_count only sets clickCount)
|
|
490
534
|
# @rbs count: Integer? -- Number of clicks to perform
|
|
491
535
|
# @rbs return: void -- No return value
|
|
492
|
-
def click: (String selector, ?delay: Numeric?, ?button: String?, ?
|
|
536
|
+
def click: (String selector, ?delay: Numeric?, ?button: String?, ?count: Integer?) -> void
|
|
493
537
|
|
|
494
538
|
# @rbs selector: String -- CSS selector
|
|
495
539
|
# @rbs return: void -- No return value
|
data/sig/puppeteer/puppeteer.rbs
CHANGED
|
@@ -30,6 +30,7 @@ class Puppeteer::Puppeteer
|
|
|
30
30
|
# @rbs network_enabled: bool? -- Enable network domain
|
|
31
31
|
# @rbs issues_enabled: bool? -- Enable issues domain
|
|
32
32
|
# @rbs block_list: Array[String]? -- URL block list patterns
|
|
33
|
+
# @rbs allow_list: Array[String]? -- URL allow list patterns
|
|
33
34
|
# @rbs enable_extensions: (bool | Array[String])? -- Enable extensions or load unpacked extensions
|
|
34
35
|
# @rbs default_viewport: Puppeteer::Viewport? -- Default viewport
|
|
35
36
|
# @rbs slow_mo: Integer? -- Delay between operations (ms)
|
|
@@ -37,7 +38,7 @@ class Puppeteer::Puppeteer
|
|
|
37
38
|
# @rbs wait_for_initial_page: bool? -- Wait for initial page to load
|
|
38
39
|
# @rbs block: Proc? -- Optional block receiving the browser
|
|
39
40
|
# @rbs return: Puppeteer::Browser -- Browser instance
|
|
40
|
-
def launch: (?product: String?, ?channel: (String | Symbol)?, ?executable_path: String?, ?ignore_default_args: Array[String]?, ?handle_SIGINT: bool?, ?handle_SIGTERM: bool?, ?handle_SIGHUP: bool?, ?timeout: Integer?, ?dumpio: bool?, ?env: Hash[String, String]?, ?pipe: bool?, ?args: Array[String]?, ?user_data_dir: String?, ?devtools: bool?, ?debugging_port: Integer?, ?headless: bool?, ?ignore_https_errors: bool?, ?network_enabled: bool?, ?issues_enabled: bool?, ?block_list: Array[String]?, ?enable_extensions: (bool | Array[String])?, ?default_viewport: Puppeteer::Viewport?, ?slow_mo: Integer?, ?protocol_timeout: Integer?, ?wait_for_initial_page: bool?) ?{ (?) -> untyped } -> Puppeteer::Browser
|
|
41
|
+
def launch: (?product: String?, ?channel: (String | Symbol)?, ?executable_path: String?, ?ignore_default_args: Array[String]?, ?handle_SIGINT: bool?, ?handle_SIGTERM: bool?, ?handle_SIGHUP: bool?, ?timeout: Integer?, ?dumpio: bool?, ?env: Hash[String, String]?, ?pipe: bool?, ?args: Array[String]?, ?user_data_dir: String?, ?devtools: bool?, ?debugging_port: Integer?, ?headless: bool?, ?ignore_https_errors: bool?, ?network_enabled: bool?, ?issues_enabled: bool?, ?block_list: Array[String]?, ?allow_list: Array[String]?, ?enable_extensions: (bool | Array[String])?, ?default_viewport: Puppeteer::Viewport?, ?slow_mo: Integer?, ?protocol_timeout: Integer?, ?wait_for_initial_page: bool?) ?{ (?) -> untyped } -> Puppeteer::Browser
|
|
41
42
|
|
|
42
43
|
# @rbs browser_ws_endpoint: String? -- Browser WebSocket endpoint
|
|
43
44
|
# @rbs browser_url: String? -- Browser HTTP URL for WebSocket discovery
|
|
@@ -47,12 +48,13 @@ class Puppeteer::Puppeteer
|
|
|
47
48
|
# @rbs network_enabled: bool? -- Enable network domain
|
|
48
49
|
# @rbs issues_enabled: bool? -- Enable issues domain
|
|
49
50
|
# @rbs block_list: Array[String]? -- URL block list patterns
|
|
51
|
+
# @rbs allow_list: Array[String]? -- URL allow list patterns
|
|
50
52
|
# @rbs default_viewport: Puppeteer::Viewport? -- Default viewport
|
|
51
53
|
# @rbs slow_mo: Integer? -- Delay between operations (ms)
|
|
52
54
|
# @rbs protocol_timeout: Integer? -- CDP protocol timeout in milliseconds
|
|
53
55
|
# @rbs block: Proc? -- Optional block receiving the browser
|
|
54
56
|
# @rbs return: Puppeteer::Browser -- Browser instance
|
|
55
|
-
def connect: (?browser_ws_endpoint: String?, ?browser_url: String?, ?transport: Puppeteer::WebSocketTransport?, ?channel: (String | Symbol)?, ?ignore_https_errors: bool?, ?network_enabled: bool?, ?issues_enabled: bool?, ?block_list: Array[String]?, ?default_viewport: Puppeteer::Viewport?, ?slow_mo: Integer?, ?protocol_timeout: Integer?) ?{ (?) -> untyped } -> Puppeteer::Browser
|
|
57
|
+
def connect: (?browser_ws_endpoint: String?, ?browser_url: String?, ?transport: Puppeteer::WebSocketTransport?, ?channel: (String | Symbol)?, ?ignore_https_errors: bool?, ?network_enabled: bool?, ?issues_enabled: bool?, ?block_list: Array[String]?, ?allow_list: Array[String]?, ?default_viewport: Puppeteer::Viewport?, ?slow_mo: Integer?, ?protocol_timeout: Integer?) ?{ (?) -> untyped } -> Puppeteer::Browser
|
|
56
58
|
|
|
57
59
|
# @rbs channel: String? -- Browser channel
|
|
58
60
|
# @rbs return: String -- Executable path
|
|
@@ -60,9 +62,6 @@ class Puppeteer::Puppeteer
|
|
|
60
62
|
|
|
61
63
|
private def launcher: () -> untyped
|
|
62
64
|
|
|
63
|
-
# @rbs return: String -- Product name
|
|
64
|
-
def product: () -> String
|
|
65
|
-
|
|
66
65
|
private def async_context?: () -> untyped
|
|
67
66
|
|
|
68
67
|
# @rbs name: String -- Custom query handler name
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Generated from lib/puppeteer/screen_recorder.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
class Puppeteer::ScreenRecorder
|
|
4
|
+
DEFAULT_FPS: ::Integer
|
|
5
|
+
|
|
6
|
+
DEFAULT_QUALITY: ::Integer
|
|
7
|
+
|
|
8
|
+
STOP: untyped
|
|
9
|
+
|
|
10
|
+
# @rbs start_timestamp: Numeric -- First CDP frame timestamp
|
|
11
|
+
# @rbs previous_timestamp: Numeric -- Previous CDP frame timestamp
|
|
12
|
+
# @rbs timestamp: Numeric -- Current CDP frame timestamp
|
|
13
|
+
# @rbs fps: Numeric -- Output frame rate
|
|
14
|
+
# @rbs return: Integer -- Frames to emit for this interval
|
|
15
|
+
def self.count_frames: (Numeric start_timestamp, Numeric previous_timestamp, Numeric timestamp, Numeric fps) -> Integer
|
|
16
|
+
|
|
17
|
+
# @rbs page: Puppeteer::Page -- Recorded page
|
|
18
|
+
# @rbs width: Numeric -- Native viewport width
|
|
19
|
+
# @rbs height: Numeric -- Native viewport height
|
|
20
|
+
# @rbs options: Hash[Symbol, untyped] -- Recorder options
|
|
21
|
+
def initialize: (Puppeteer::Page page, Numeric width, Numeric height, ?Hash[Symbol, untyped] options) -> untyped
|
|
22
|
+
|
|
23
|
+
# @rbs return: String -- Encoded bytes produced so far
|
|
24
|
+
def data: () -> String
|
|
25
|
+
|
|
26
|
+
# @rbs return: void -- Stop recording and flush FFmpeg
|
|
27
|
+
def stop: () -> void
|
|
28
|
+
|
|
29
|
+
private def ensure_output_directory: () -> untyped
|
|
30
|
+
|
|
31
|
+
private def build_command: (untyped width, untyped height, untyped options) -> untyped
|
|
32
|
+
|
|
33
|
+
private def format_args: (untyped format, untyped fps, untyped loop_count, untyped delay, untyped quality, untyped colors) -> untyped
|
|
34
|
+
|
|
35
|
+
private def handle_frame: (untyped event) -> untyped
|
|
36
|
+
|
|
37
|
+
private def enqueue_last_frame: () -> untyped
|
|
38
|
+
|
|
39
|
+
private def finish_process: () -> untyped
|
|
40
|
+
|
|
41
|
+
private def write_frames: () -> untyped
|
|
42
|
+
|
|
43
|
+
private def read_output: () -> untyped
|
|
44
|
+
|
|
45
|
+
private def read_stderr: () -> untyped
|
|
46
|
+
|
|
47
|
+
private def monotonic_time: () -> untyped
|
|
48
|
+
end
|
|
@@ -6,6 +6,10 @@ class Puppeteer::TouchScreen
|
|
|
6
6
|
# @rbs return: void -- No return value
|
|
7
7
|
def initialize: (Puppeteer::CDPSession client, Puppeteer::Keyboard keyboard) -> void
|
|
8
8
|
|
|
9
|
+
# @rbs client: Puppeteer::CDPSession -- Replacement CDP session
|
|
10
|
+
# @rbs return: void -- No return value
|
|
11
|
+
def update_client: (Puppeteer::CDPSession client) -> void
|
|
12
|
+
|
|
9
13
|
# @rbs x: Numeric -- X coordinate
|
|
10
14
|
# @rbs y: Numeric -- Y coordinate
|
|
11
15
|
# @rbs return: void -- No return value
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Generated from lib/puppeteer/web_mcp.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
class Puppeteer::WebMCPTool
|
|
4
|
+
include Puppeteer::EventCallbackable
|
|
5
|
+
|
|
6
|
+
# @rbs web_mcp: Puppeteer::WebMCP -- Owning WebMCP instance
|
|
7
|
+
# @rbs tool: Hash[String, untyped] -- CDP tool payload
|
|
8
|
+
# @rbs frame: Puppeteer::Frame -- Defining frame
|
|
9
|
+
def initialize: (Puppeteer::WebMCP web_mcp, Hash[String, untyped] tool, Puppeteer::Frame frame) -> untyped
|
|
10
|
+
|
|
11
|
+
attr_reader name: untyped
|
|
12
|
+
|
|
13
|
+
attr_reader description: untyped
|
|
14
|
+
|
|
15
|
+
attr_reader input_schema: untyped
|
|
16
|
+
|
|
17
|
+
attr_reader annotations: untyped
|
|
18
|
+
|
|
19
|
+
attr_reader frame: untyped
|
|
20
|
+
|
|
21
|
+
attr_reader location: untyped
|
|
22
|
+
|
|
23
|
+
attr_reader raw_stack_trace: untyped
|
|
24
|
+
|
|
25
|
+
# @rbs return: Puppeteer::ElementHandle? -- Declarative form element
|
|
26
|
+
def form_element: () -> Puppeteer::ElementHandle?
|
|
27
|
+
|
|
28
|
+
# @rbs input: Hash[untyped, untyped] -- Tool input
|
|
29
|
+
# @rbs return: Puppeteer::WebMCPToolCallResult -- Invocation result
|
|
30
|
+
def execute: (?Hash[untyped, untyped] input) -> Puppeteer::WebMCPToolCallResult
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
class Puppeteer::WebMCPToolCall
|
|
34
|
+
# @rbs id: String -- Invocation id
|
|
35
|
+
# @rbs tool: Puppeteer::WebMCPTool -- Invoked tool
|
|
36
|
+
# @rbs input: String -- JSON-encoded input
|
|
37
|
+
def initialize: (String id, Puppeteer::WebMCPTool tool, String input) -> untyped
|
|
38
|
+
|
|
39
|
+
attr_reader id: untyped
|
|
40
|
+
|
|
41
|
+
attr_reader tool: untyped
|
|
42
|
+
|
|
43
|
+
attr_reader input: untyped
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
class Puppeteer::WebMCPToolCallResult
|
|
47
|
+
# @rbs id: String -- Invocation id
|
|
48
|
+
# @rbs call: Puppeteer::WebMCPToolCall? -- Corresponding call
|
|
49
|
+
# @rbs status: String -- Invocation status
|
|
50
|
+
# @rbs output: untyped -- Invocation output
|
|
51
|
+
# @rbs error_text: String? -- Error text
|
|
52
|
+
# @rbs exception: Hash[String, untyped]? -- Remote exception
|
|
53
|
+
def initialize: (id: String, call: Puppeteer::WebMCPToolCall?, status: String, output: untyped, error_text: String?, exception: Hash[String, untyped]?) -> untyped
|
|
54
|
+
|
|
55
|
+
attr_reader id: untyped
|
|
56
|
+
|
|
57
|
+
attr_reader call: untyped
|
|
58
|
+
|
|
59
|
+
attr_reader status: untyped
|
|
60
|
+
|
|
61
|
+
attr_reader output: untyped
|
|
62
|
+
|
|
63
|
+
attr_reader error_text: untyped
|
|
64
|
+
|
|
65
|
+
attr_reader exception: untyped
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
class Puppeteer::WebMCP
|
|
69
|
+
include Puppeteer::EventCallbackable
|
|
70
|
+
|
|
71
|
+
include Puppeteer::DebugPrint
|
|
72
|
+
|
|
73
|
+
class ToolsEvent < Struct[untyped]
|
|
74
|
+
attr_accessor tools(): untyped
|
|
75
|
+
|
|
76
|
+
def self.new: (?tools: untyped) -> instance
|
|
77
|
+
| ({ ?tools: untyped }) -> instance
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# @rbs client: Puppeteer::CDPSession -- Primary page session
|
|
81
|
+
# @rbs frame_manager: Puppeteer::FrameManager -- Page frame manager
|
|
82
|
+
def initialize: (Puppeteer::CDPSession client, Puppeteer::FrameManager frame_manager) -> untyped
|
|
83
|
+
|
|
84
|
+
# @rbs return: void -- Enable the WebMCP CDP domain when available
|
|
85
|
+
def initialize_domain: () -> void
|
|
86
|
+
|
|
87
|
+
# @rbs tool: Puppeteer::WebMCPTool -- Tool to invoke
|
|
88
|
+
# @rbs input: Hash[untyped, untyped] -- Invocation input
|
|
89
|
+
# @rbs return: Hash[String, untyped] -- Invocation metadata
|
|
90
|
+
def invoke_tool: (Puppeteer::WebMCPTool tool, Hash[untyped, untyped] input) -> Hash[String, untyped]
|
|
91
|
+
|
|
92
|
+
# @rbs return: Array[Puppeteer::WebMCPTool] -- Registered tools
|
|
93
|
+
def tools: () -> Array[Puppeteer::WebMCPTool]
|
|
94
|
+
|
|
95
|
+
# @rbs client: Puppeteer::CDPSession -- Replacement primary session
|
|
96
|
+
# @rbs return: void -- No return value
|
|
97
|
+
def update_client: (Puppeteer::CDPSession client) -> void
|
|
98
|
+
|
|
99
|
+
private def bind_listeners: () -> untyped
|
|
100
|
+
|
|
101
|
+
private def handle_tools_added: (untyped event) -> untyped
|
|
102
|
+
|
|
103
|
+
private def handle_tools_removed: (untyped event) -> untyped
|
|
104
|
+
|
|
105
|
+
private def handle_tool_invoked: (untyped event) -> untyped
|
|
106
|
+
|
|
107
|
+
private def handle_tool_responded: (untyped event) -> untyped
|
|
108
|
+
|
|
109
|
+
private def listen_to_context_destroyed: (untyped frame) -> untyped
|
|
110
|
+
|
|
111
|
+
private def handle_context_disposed: (untyped frame) -> untyped
|
|
112
|
+
end
|
|
@@ -4,6 +4,8 @@ class Puppeteer::WorkerWorld
|
|
|
4
4
|
# @rbs client: Puppeteer::CDPSession -- CDP session
|
|
5
5
|
def initialize: (Puppeteer::CDPSession client) -> untyped
|
|
6
6
|
|
|
7
|
+
attr_reader task_manager: untyped
|
|
8
|
+
|
|
7
9
|
# @rbs context: Puppeteer::ExecutionContext -- Execution context to bind
|
|
8
10
|
# @rbs return: void -- No return value
|
|
9
11
|
def set_context: (Puppeteer::ExecutionContext context) -> void
|
|
@@ -21,11 +23,20 @@ class Puppeteer::WorkerWorld
|
|
|
21
23
|
# @rbs return: Puppeteer::JSHandle -- Handle to evaluation result
|
|
22
24
|
def evaluate_handle: (String page_function, *untyped args) -> Puppeteer::JSHandle
|
|
23
25
|
|
|
26
|
+
# @rbs page_function: String -- Function or expression to evaluate
|
|
27
|
+
# @rbs args: Array[untyped] -- Arguments for evaluation
|
|
28
|
+
# @rbs polling: (Integer | String)? -- Polling interval or mode
|
|
29
|
+
# @rbs timeout: Integer? -- Maximum wait time in milliseconds
|
|
30
|
+
# @rbs return: Puppeteer::JSHandle -- Handle to the truthy evaluation result
|
|
31
|
+
def wait_for_function: (String page_function, ?args: Array[untyped], ?polling: (Integer | String)?, ?timeout: Integer?) -> Puppeteer::JSHandle
|
|
32
|
+
|
|
24
33
|
# @rbs return: nil -- Workers do not have frames
|
|
25
34
|
def frame: () -> nil
|
|
26
35
|
|
|
27
36
|
# @rbs return: void -- Dispose world resources
|
|
28
37
|
def dispose: () -> void
|
|
38
|
+
|
|
39
|
+
def detached?: () -> untyped
|
|
29
40
|
end
|
|
30
41
|
|
|
31
42
|
class Puppeteer::WebWorker
|
|
@@ -56,6 +67,13 @@ class Puppeteer::WebWorker
|
|
|
56
67
|
# @rbs return: Puppeteer::JSHandle -- Handle to evaluation result
|
|
57
68
|
def evaluate_handle: (String page_function, *untyped args) -> Puppeteer::JSHandle
|
|
58
69
|
|
|
70
|
+
# @rbs page_function: String -- Function or expression to evaluate
|
|
71
|
+
# @rbs args: Array[untyped] -- Arguments for evaluation
|
|
72
|
+
# @rbs polling: (Integer | String)? -- Polling interval or mode
|
|
73
|
+
# @rbs timeout: Integer? -- Maximum wait time in milliseconds
|
|
74
|
+
# @rbs return: Puppeteer::JSHandle -- Handle to the truthy evaluation result
|
|
75
|
+
def wait_for_function: (String page_function, ?args: Array[untyped], ?polling: (Integer | String)?, ?timeout: Integer?) -> Puppeteer::JSHandle
|
|
76
|
+
|
|
59
77
|
# @rbs return: void -- Not supported
|
|
60
78
|
def close: () -> void
|
|
61
79
|
end
|
|
@@ -78,6 +96,27 @@ class Puppeteer::CdpWebWorker < Puppeteer::WebWorker
|
|
|
78
96
|
# @rbs return: Puppeteer::CDPSession -- Worker CDP session
|
|
79
97
|
def client: () -> Puppeteer::CDPSession
|
|
80
98
|
|
|
99
|
+
# @rbs page_function: String -- Function or expression to evaluate
|
|
100
|
+
# @rbs args: Array[untyped] -- Arguments for evaluation
|
|
101
|
+
# @rbs return: untyped -- Evaluation result
|
|
102
|
+
def evaluate: (String page_function, *untyped args) -> untyped
|
|
103
|
+
|
|
104
|
+
# @rbs page_function: String -- Function or expression to evaluate
|
|
105
|
+
# @rbs args: Array[untyped] -- Arguments for evaluation
|
|
106
|
+
# @rbs return: Puppeteer::JSHandle -- Handle to evaluation result
|
|
107
|
+
def evaluate_handle: (String page_function, *untyped args) -> Puppeteer::JSHandle
|
|
108
|
+
|
|
109
|
+
# @rbs page_function: String -- Function or expression to evaluate
|
|
110
|
+
# @rbs args: Array[untyped] -- Arguments for evaluation
|
|
111
|
+
# @rbs polling: (Integer | String)? -- Polling interval or mode
|
|
112
|
+
# @rbs timeout: Integer? -- Maximum wait time in milliseconds
|
|
113
|
+
# @rbs return: Puppeteer::JSHandle -- Handle to the truthy evaluation result
|
|
114
|
+
def wait_for_function: (String page_function, ?args: Array[untyped], ?polling: (Integer | String)?, ?timeout: Integer?) -> Puppeteer::JSHandle
|
|
115
|
+
|
|
116
|
+
private def console_value_from_js_handle: (untyped handle) -> untyped
|
|
117
|
+
|
|
118
|
+
private def console_message_locations: (untyped stack_trace) -> untyped
|
|
119
|
+
|
|
81
120
|
# @rbs return: void -- Close the worker
|
|
82
121
|
def close: () -> void
|
|
83
122
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: puppeteer-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.53.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- YusukeIwaki
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-07-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: async
|
|
@@ -98,6 +98,20 @@ dependencies:
|
|
|
98
98
|
- - ">="
|
|
99
99
|
- !ruby/object:Gem::Version
|
|
100
100
|
version: '3.0'
|
|
101
|
+
- !ruby/object:Gem::Dependency
|
|
102
|
+
name: urlpattern
|
|
103
|
+
requirement: !ruby/object:Gem::Requirement
|
|
104
|
+
requirements:
|
|
105
|
+
- - "~>"
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: 0.1.1
|
|
108
|
+
type: :runtime
|
|
109
|
+
prerelease: false
|
|
110
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
111
|
+
requirements:
|
|
112
|
+
- - "~>"
|
|
113
|
+
- !ruby/object:Gem::Version
|
|
114
|
+
version: 0.1.1
|
|
101
115
|
- !ruby/object:Gem::Dependency
|
|
102
116
|
name: bundler
|
|
103
117
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -309,6 +323,7 @@ files:
|
|
|
309
323
|
- docs/api_coverage.md
|
|
310
324
|
- lib/puppeteer-ruby.rb
|
|
311
325
|
- lib/puppeteer.rb
|
|
326
|
+
- lib/puppeteer/accessibility.rb
|
|
312
327
|
- lib/puppeteer/aria_query_handler.rb
|
|
313
328
|
- lib/puppeteer/async_utils.rb
|
|
314
329
|
- lib/puppeteer/browser.rb
|
|
@@ -381,6 +396,7 @@ files:
|
|
|
381
396
|
- lib/puppeteer/query_handler_manager.rb
|
|
382
397
|
- lib/puppeteer/reactor_runner.rb
|
|
383
398
|
- lib/puppeteer/remote_object.rb
|
|
399
|
+
- lib/puppeteer/screen_recorder.rb
|
|
384
400
|
- lib/puppeteer/target.rb
|
|
385
401
|
- lib/puppeteer/task_manager.rb
|
|
386
402
|
- lib/puppeteer/timeout_helper.rb
|
|
@@ -391,6 +407,7 @@ files:
|
|
|
391
407
|
- lib/puppeteer/version.rb
|
|
392
408
|
- lib/puppeteer/viewport.rb
|
|
393
409
|
- lib/puppeteer/wait_task.rb
|
|
410
|
+
- lib/puppeteer/web_mcp.rb
|
|
394
411
|
- lib/puppeteer/web_socket.rb
|
|
395
412
|
- lib/puppeteer/web_socket_transport.rb
|
|
396
413
|
- lib/puppeteer/web_worker.rb
|
|
@@ -398,6 +415,7 @@ files:
|
|
|
398
415
|
- puppeteer-ruby.png
|
|
399
416
|
- sig/_external.rbs
|
|
400
417
|
- sig/_supplementary.rbs
|
|
418
|
+
- sig/puppeteer/accessibility.rbs
|
|
401
419
|
- sig/puppeteer/browser.rbs
|
|
402
420
|
- sig/puppeteer/cdp_session.rbs
|
|
403
421
|
- sig/puppeteer/chrome_user_data_dir.rbs
|
|
@@ -418,8 +436,10 @@ files:
|
|
|
418
436
|
- sig/puppeteer/page.rbs
|
|
419
437
|
- sig/puppeteer/puppeteer.rbs
|
|
420
438
|
- sig/puppeteer/remote_object.rbs
|
|
439
|
+
- sig/puppeteer/screen_recorder.rbs
|
|
421
440
|
- sig/puppeteer/touch_handle.rbs
|
|
422
441
|
- sig/puppeteer/touch_screen.rbs
|
|
442
|
+
- sig/puppeteer/web_mcp.rbs
|
|
423
443
|
- sig/puppeteer/web_worker.rbs
|
|
424
444
|
homepage: https://github.com/YusukeIwaki/puppeteer-ruby
|
|
425
445
|
licenses: []
|