playwright-ruby-client 1.63.0 → 1.64.1
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/documentation/docs/api/api_request_context.md +47 -0
- data/documentation/docs/api/browser.md +2 -0
- data/documentation/docs/api/browser_type.md +1 -0
- data/documentation/docs/api/clock.md +1 -0
- data/documentation/docs/api/credentials.md +6 -3
- data/documentation/docs/api/frame.md +6 -1
- data/documentation/docs/api/locator.md +38 -0
- data/documentation/docs/api/page.md +32 -1
- data/documentation/docs/api/request.md +1 -1
- data/documentation/docs/api/response.md +2 -1
- data/documentation/docs/api/tracing.md +2 -2
- data/documentation/docs/api/web_mcp.md +34 -0
- data/documentation/docs/article/guides/playwright_on_alpine_linux.md +1 -1
- data/documentation/docs/include/api_coverage.md +12 -0
- data/lib/playwright/channel_owners/api_request_context.rb +16 -0
- data/lib/playwright/channel_owners/browser_context.rb +4 -31
- data/lib/playwright/channel_owners/frame.rb +4 -3
- data/lib/playwright/channel_owners/local_utils.rb +5 -0
- data/lib/playwright/channel_owners/page.rb +10 -2
- data/lib/playwright/channel_owners/tracing.rb +2 -0
- data/lib/playwright/connection.rb +6 -2
- data/lib/playwright/credentials_impl.rb +2 -1
- data/lib/playwright/errors.rb +4 -1
- data/lib/playwright/locator_impl.rb +22 -8
- data/lib/playwright/screencast.rb +4 -2
- data/lib/playwright/transport.rb +21 -5
- data/lib/playwright/utils.rb +20 -0
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright/web_mcp_impl.rb +21 -0
- data/lib/playwright_api/api_request_context.rb +44 -6
- data/lib/playwright_api/browser.rb +10 -8
- data/lib/playwright_api/browser_context.rb +13 -13
- data/lib/playwright_api/browser_type.rb +8 -7
- data/lib/playwright_api/cdp_session.rb +6 -6
- data/lib/playwright_api/clock.rb +1 -0
- data/lib/playwright_api/credentials.rb +7 -4
- data/lib/playwright_api/dialog.rb +6 -6
- data/lib/playwright_api/element_handle.rb +6 -6
- data/lib/playwright_api/frame.rb +19 -13
- data/lib/playwright_api/js_handle.rb +6 -6
- data/lib/playwright_api/locator.rb +35 -0
- data/lib/playwright_api/page.rb +46 -17
- data/lib/playwright_api/playwright.rb +6 -6
- data/lib/playwright_api/request.rb +9 -9
- data/lib/playwright_api/response.rb +8 -7
- data/lib/playwright_api/route.rb +6 -6
- data/lib/playwright_api/tracing.rb +8 -8
- data/lib/playwright_api/web_mcp.rb +26 -0
- data/lib/playwright_api/web_socket.rb +6 -6
- data/lib/playwright_api/worker.rb +8 -8
- data/sig/playwright.rbs +21 -8
- metadata +5 -2
|
@@ -98,12 +98,6 @@ module Playwright
|
|
|
98
98
|
wrap_impl(@impl.to_s)
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
-
# -- inherited from EventEmitter --
|
|
102
|
-
# @nodoc
|
|
103
|
-
def off(event, callback)
|
|
104
|
-
event_emitter_proxy.off(event, callback)
|
|
105
|
-
end
|
|
106
|
-
|
|
107
101
|
# -- inherited from EventEmitter --
|
|
108
102
|
# @nodoc
|
|
109
103
|
def once(event, callback)
|
|
@@ -116,6 +110,12 @@ module Playwright
|
|
|
116
110
|
event_emitter_proxy.on(event, callback)
|
|
117
111
|
end
|
|
118
112
|
|
|
113
|
+
# -- inherited from EventEmitter --
|
|
114
|
+
# @nodoc
|
|
115
|
+
def off(event, callback)
|
|
116
|
+
event_emitter_proxy.off(event, callback)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
119
|
private def event_emitter_proxy
|
|
120
120
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
|
121
121
|
end
|
|
@@ -961,6 +961,26 @@ module Playwright
|
|
|
961
961
|
#
|
|
962
962
|
# Returns a new locator that uses best practices for referencing the matched element, prioritizing test ids,
|
|
963
963
|
# aria roles, and other user-facing attributes over CSS selectors. This is useful for converting implementation-detail selectors into more resilient, human-readable locators.
|
|
964
|
+
#
|
|
965
|
+
# **Usage**
|
|
966
|
+
#
|
|
967
|
+
# An agent can pick an element by its ref from an [`method: Page.ariaSnapshot`] taken in the `"ai"` mode. Refs only
|
|
968
|
+
# work for the latest snapshot. Normalize the ref locator and convert it to a string to get resilient locator code
|
|
969
|
+
# in your language, the same way `codegen` does.
|
|
970
|
+
#
|
|
971
|
+
# Consider the following aria snapshot.
|
|
972
|
+
#
|
|
973
|
+
# ```yaml
|
|
974
|
+
# - button "Submit" [ref=e2]
|
|
975
|
+
# ```
|
|
976
|
+
#
|
|
977
|
+
# You can turn the ref into locator code:
|
|
978
|
+
#
|
|
979
|
+
# ```python sync
|
|
980
|
+
# normalized = page.get_by_ref("e2").normalize()
|
|
981
|
+
# print(str(normalized))
|
|
982
|
+
# # get_by_role("button", name="Submit")
|
|
983
|
+
# ```
|
|
964
984
|
def normalize
|
|
965
985
|
wrap_impl(@impl.normalize)
|
|
966
986
|
end
|
|
@@ -1376,6 +1396,21 @@ module Playwright
|
|
|
1376
1396
|
wrap_impl(@impl.wait_for_function(unwrap_impl(expression), arg: unwrap_impl(arg), timeout: unwrap_impl(timeout)))
|
|
1377
1397
|
end
|
|
1378
1398
|
|
|
1399
|
+
#
|
|
1400
|
+
# Returns a locator that matches this locator's elements inside each element matched by `locator`.
|
|
1401
|
+
#
|
|
1402
|
+
# Note that relative locators, such as [`method: Locator.nth`] or [`method: Locator.first`], are resolved separately inside each matched parent. In the example below, `page.getByRole('cell').nth(2)` picks the third cell of every row, not the third cell in the whole table.
|
|
1403
|
+
#
|
|
1404
|
+
# **Usage**
|
|
1405
|
+
#
|
|
1406
|
+
# ```python sync
|
|
1407
|
+
# third_column = page.get_by_role("cell").nth(2).within(page.get_by_role("row"))
|
|
1408
|
+
# expect(third_column).to_have_text(["Apple", "Banana", "Cherry"])
|
|
1409
|
+
# ```
|
|
1410
|
+
def within(locator)
|
|
1411
|
+
wrap_impl(@impl.within(unwrap_impl(locator)))
|
|
1412
|
+
end
|
|
1413
|
+
|
|
1379
1414
|
# @nodoc
|
|
1380
1415
|
def expect(expression, options, title)
|
|
1381
1416
|
wrap_impl(@impl.expect(unwrap_impl(expression), unwrap_impl(options), unwrap_impl(title)))
|
data/lib/playwright_api/page.rb
CHANGED
|
@@ -88,6 +88,14 @@ module Playwright
|
|
|
88
88
|
wrap_impl(@impl.touchscreen)
|
|
89
89
|
end
|
|
90
90
|
|
|
91
|
+
#
|
|
92
|
+
# Tools that the main frame registers through the experimental `WebMCP` browser API. Shortcut for [`property: Frame.webmcp`] of [`method: Page.mainFrame`], see `WebMCP` for details.
|
|
93
|
+
#
|
|
94
|
+
# **Usage**
|
|
95
|
+
def webmcp # property
|
|
96
|
+
wrap_impl(@impl.webmcp)
|
|
97
|
+
end
|
|
98
|
+
|
|
91
99
|
#
|
|
92
100
|
# Adds a script which would be evaluated in one of the following scenarios:
|
|
93
101
|
# - Whenever the page is navigated.
|
|
@@ -201,8 +209,8 @@ module Playwright
|
|
|
201
209
|
|
|
202
210
|
#
|
|
203
211
|
# Gets the full HTML contents of the page, including the doctype.
|
|
204
|
-
def content
|
|
205
|
-
wrap_impl(@impl.content)
|
|
212
|
+
def content(includeShadow: nil)
|
|
213
|
+
wrap_impl(@impl.content(includeShadow: unwrap_impl(includeShadow)))
|
|
206
214
|
end
|
|
207
215
|
|
|
208
216
|
#
|
|
@@ -687,6 +695,27 @@ module Playwright
|
|
|
687
695
|
wrap_impl(@impl.get_by_placeholder(unwrap_impl(text), exact: unwrap_impl(exact)))
|
|
688
696
|
end
|
|
689
697
|
|
|
698
|
+
#
|
|
699
|
+
# Locate element by its aria ref. Refs like `[ref=e2]` are reported by [`method: Page.ariaSnapshot`] when called with
|
|
700
|
+
# the `"ai"` mode, and resolve against the latest snapshot taken in the element's frame.
|
|
701
|
+
#
|
|
702
|
+
# **Usage**
|
|
703
|
+
#
|
|
704
|
+
# Consider the following aria snapshot.
|
|
705
|
+
#
|
|
706
|
+
# ```yaml
|
|
707
|
+
# - button "Submit" [ref=e2]
|
|
708
|
+
# ```
|
|
709
|
+
#
|
|
710
|
+
# You can locate the button by its ref:
|
|
711
|
+
#
|
|
712
|
+
# ```python sync
|
|
713
|
+
# page.get_by_ref("e2").click()
|
|
714
|
+
# ```
|
|
715
|
+
def get_by_ref(ref)
|
|
716
|
+
wrap_impl(@impl.get_by_ref(unwrap_impl(ref)))
|
|
717
|
+
end
|
|
718
|
+
|
|
690
719
|
#
|
|
691
720
|
# Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles), [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
|
|
692
721
|
#
|
|
@@ -1906,8 +1935,8 @@ module Playwright
|
|
|
1906
1935
|
end
|
|
1907
1936
|
|
|
1908
1937
|
# @nodoc
|
|
1909
|
-
def
|
|
1910
|
-
wrap_impl(@impl.
|
|
1938
|
+
def snapshot_for_ai(timeout: nil, depth: nil, boxes: nil)
|
|
1939
|
+
wrap_impl(@impl.snapshot_for_ai(timeout: unwrap_impl(timeout), depth: unwrap_impl(depth), boxes: unwrap_impl(boxes)))
|
|
1911
1940
|
end
|
|
1912
1941
|
|
|
1913
1942
|
# @nodoc
|
|
@@ -1916,13 +1945,8 @@ module Playwright
|
|
|
1916
1945
|
end
|
|
1917
1946
|
|
|
1918
1947
|
# @nodoc
|
|
1919
|
-
def
|
|
1920
|
-
wrap_impl(@impl.
|
|
1921
|
-
end
|
|
1922
|
-
|
|
1923
|
-
# @nodoc
|
|
1924
|
-
def snapshot_for_ai(timeout: nil, depth: nil, boxes: nil)
|
|
1925
|
-
wrap_impl(@impl.snapshot_for_ai(timeout: unwrap_impl(timeout), depth: unwrap_impl(depth), boxes: unwrap_impl(boxes)))
|
|
1948
|
+
def stop_js_coverage
|
|
1949
|
+
wrap_impl(@impl.stop_js_coverage)
|
|
1926
1950
|
end
|
|
1927
1951
|
|
|
1928
1952
|
# @nodoc
|
|
@@ -1935,6 +1959,11 @@ module Playwright
|
|
|
1935
1959
|
wrap_impl(@impl._assertions(unwrap_impl(timeout), unwrap_impl(is_not), unwrap_impl(message)))
|
|
1936
1960
|
end
|
|
1937
1961
|
|
|
1962
|
+
# @nodoc
|
|
1963
|
+
def start_css_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
|
|
1964
|
+
wrap_impl(@impl.start_css_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
|
|
1965
|
+
end
|
|
1966
|
+
|
|
1938
1967
|
# @nodoc
|
|
1939
1968
|
def guid
|
|
1940
1969
|
wrap_impl(@impl.guid)
|
|
@@ -1945,12 +1974,6 @@ module Playwright
|
|
|
1945
1974
|
wrap_impl(@impl.owned_context=(unwrap_impl(req)))
|
|
1946
1975
|
end
|
|
1947
1976
|
|
|
1948
|
-
# -- inherited from EventEmitter --
|
|
1949
|
-
# @nodoc
|
|
1950
|
-
def off(event, callback)
|
|
1951
|
-
event_emitter_proxy.off(event, callback)
|
|
1952
|
-
end
|
|
1953
|
-
|
|
1954
1977
|
# -- inherited from EventEmitter --
|
|
1955
1978
|
# @nodoc
|
|
1956
1979
|
def once(event, callback)
|
|
@@ -1963,6 +1986,12 @@ module Playwright
|
|
|
1963
1986
|
event_emitter_proxy.on(event, callback)
|
|
1964
1987
|
end
|
|
1965
1988
|
|
|
1989
|
+
# -- inherited from EventEmitter --
|
|
1990
|
+
# @nodoc
|
|
1991
|
+
def off(event, callback)
|
|
1992
|
+
event_emitter_proxy.off(event, callback)
|
|
1993
|
+
end
|
|
1994
|
+
|
|
1966
1995
|
private def event_emitter_proxy
|
|
1967
1996
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
|
1968
1997
|
end
|
|
@@ -103,12 +103,6 @@ module Playwright
|
|
|
103
103
|
wrap_impl(@impl.electron)
|
|
104
104
|
end
|
|
105
105
|
|
|
106
|
-
# -- inherited from EventEmitter --
|
|
107
|
-
# @nodoc
|
|
108
|
-
def off(event, callback)
|
|
109
|
-
event_emitter_proxy.off(event, callback)
|
|
110
|
-
end
|
|
111
|
-
|
|
112
106
|
# -- inherited from EventEmitter --
|
|
113
107
|
# @nodoc
|
|
114
108
|
def once(event, callback)
|
|
@@ -121,6 +115,12 @@ module Playwright
|
|
|
121
115
|
event_emitter_proxy.on(event, callback)
|
|
122
116
|
end
|
|
123
117
|
|
|
118
|
+
# -- inherited from EventEmitter --
|
|
119
|
+
# @nodoc
|
|
120
|
+
def off(event, callback)
|
|
121
|
+
event_emitter_proxy.off(event, callback)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
124
|
private def event_emitter_proxy
|
|
125
125
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
|
126
126
|
end
|
|
@@ -155,7 +155,7 @@ module Playwright
|
|
|
155
155
|
#
|
|
156
156
|
# Contains the request's resource type as it was perceived by the rendering engine. ResourceType will be one of the
|
|
157
157
|
# following: `document`, `stylesheet`, `image`, `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`, `eventsource`,
|
|
158
|
-
# `websocket`, `manifest`, `other`.
|
|
158
|
+
# `websocket`, `manifest`, `beacon`, `ping`, `cspreport`, `other`.
|
|
159
159
|
def resource_type
|
|
160
160
|
wrap_impl(@impl.resource_type)
|
|
161
161
|
end
|
|
@@ -217,20 +217,14 @@ module Playwright
|
|
|
217
217
|
wrap_impl(@impl.url)
|
|
218
218
|
end
|
|
219
219
|
|
|
220
|
-
# @nodoc
|
|
221
|
-
def header_values(name)
|
|
222
|
-
wrap_impl(@impl.header_values(unwrap_impl(name)))
|
|
223
|
-
end
|
|
224
|
-
|
|
225
220
|
# @nodoc
|
|
226
221
|
def apply_fallback_overrides(overrides)
|
|
227
222
|
wrap_impl(@impl.apply_fallback_overrides(unwrap_impl(overrides)))
|
|
228
223
|
end
|
|
229
224
|
|
|
230
|
-
# -- inherited from EventEmitter --
|
|
231
225
|
# @nodoc
|
|
232
|
-
def
|
|
233
|
-
|
|
226
|
+
def header_values(name)
|
|
227
|
+
wrap_impl(@impl.header_values(unwrap_impl(name)))
|
|
234
228
|
end
|
|
235
229
|
|
|
236
230
|
# -- inherited from EventEmitter --
|
|
@@ -245,6 +239,12 @@ module Playwright
|
|
|
245
239
|
event_emitter_proxy.on(event, callback)
|
|
246
240
|
end
|
|
247
241
|
|
|
242
|
+
# -- inherited from EventEmitter --
|
|
243
|
+
# @nodoc
|
|
244
|
+
def off(event, callback)
|
|
245
|
+
event_emitter_proxy.off(event, callback)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
248
|
private def event_emitter_proxy
|
|
249
249
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
|
250
250
|
end
|
|
@@ -42,8 +42,9 @@ module Playwright
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
#
|
|
45
|
-
# An array with all the
|
|
45
|
+
# An array with all the response HTTP headers associated with this response. Unlike [`method: Response.allHeaders`], header names are NOT lower-cased.
|
|
46
46
|
# Headers with multiple entries, such as `Set-Cookie`, appear in the array multiple times.
|
|
47
|
+
# Some browser network stacks combine multiple field values before reporting them, so separate entries are not always available.
|
|
47
48
|
def headers_array
|
|
48
49
|
wrap_impl(@impl.headers_array)
|
|
49
50
|
end
|
|
@@ -133,12 +134,6 @@ module Playwright
|
|
|
133
134
|
wrap_impl(@impl.from_service_worker?)
|
|
134
135
|
end
|
|
135
136
|
|
|
136
|
-
# -- inherited from EventEmitter --
|
|
137
|
-
# @nodoc
|
|
138
|
-
def off(event, callback)
|
|
139
|
-
event_emitter_proxy.off(event, callback)
|
|
140
|
-
end
|
|
141
|
-
|
|
142
137
|
# -- inherited from EventEmitter --
|
|
143
138
|
# @nodoc
|
|
144
139
|
def once(event, callback)
|
|
@@ -151,6 +146,12 @@ module Playwright
|
|
|
151
146
|
event_emitter_proxy.on(event, callback)
|
|
152
147
|
end
|
|
153
148
|
|
|
149
|
+
# -- inherited from EventEmitter --
|
|
150
|
+
# @nodoc
|
|
151
|
+
def off(event, callback)
|
|
152
|
+
event_emitter_proxy.off(event, callback)
|
|
153
|
+
end
|
|
154
|
+
|
|
154
155
|
private def event_emitter_proxy
|
|
155
156
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
|
156
157
|
end
|
data/lib/playwright_api/route.rb
CHANGED
|
@@ -177,12 +177,6 @@ module Playwright
|
|
|
177
177
|
wrap_impl(@impl.redirect_navigation_request(unwrap_impl(url)))
|
|
178
178
|
end
|
|
179
179
|
|
|
180
|
-
# -- inherited from EventEmitter --
|
|
181
|
-
# @nodoc
|
|
182
|
-
def off(event, callback)
|
|
183
|
-
event_emitter_proxy.off(event, callback)
|
|
184
|
-
end
|
|
185
|
-
|
|
186
180
|
# -- inherited from EventEmitter --
|
|
187
181
|
# @nodoc
|
|
188
182
|
def once(event, callback)
|
|
@@ -195,6 +189,12 @@ module Playwright
|
|
|
195
189
|
event_emitter_proxy.on(event, callback)
|
|
196
190
|
end
|
|
197
191
|
|
|
192
|
+
# -- inherited from EventEmitter --
|
|
193
|
+
# @nodoc
|
|
194
|
+
def off(event, callback)
|
|
195
|
+
event_emitter_proxy.off(event, callback)
|
|
196
|
+
end
|
|
197
|
+
|
|
198
198
|
private def event_emitter_proxy
|
|
199
199
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
|
200
200
|
end
|
|
@@ -19,7 +19,7 @@ module Playwright
|
|
|
19
19
|
class Tracing < PlaywrightApi
|
|
20
20
|
|
|
21
21
|
#
|
|
22
|
-
# Start tracing.
|
|
22
|
+
# Start tracing. Disposing the returned `Disposable` stops tracing without saving the trace, similarly to calling [`method: Tracing.stop`] without a path.
|
|
23
23
|
#
|
|
24
24
|
# **NOTE**: You probably want to [enable tracing in your config file](https://playwright.dev/docs/api/class-testoptions#test-options-trace) instead of using `Tracing.start`.
|
|
25
25
|
#
|
|
@@ -46,7 +46,7 @@ module Playwright
|
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
#
|
|
49
|
-
# Start a new trace chunk. If you'd like to record multiple traces on the same `BrowserContext`, use [`method: Tracing.start`] once, and then create multiple trace chunks with [`method: Tracing.startChunk`] and [`method: Tracing.stopChunk`].
|
|
49
|
+
# Start a new trace chunk. Disposing the returned `Disposable` stops the chunk without saving it, similarly to calling [`method: Tracing.stopChunk`] without a path. If you'd like to record multiple traces on the same `BrowserContext`, use [`method: Tracing.start`] once, and then create multiple trace chunks with [`method: Tracing.startChunk`] and [`method: Tracing.stopChunk`].
|
|
50
50
|
#
|
|
51
51
|
# **Usage**
|
|
52
52
|
#
|
|
@@ -129,12 +129,6 @@ module Playwright
|
|
|
129
129
|
wrap_impl(@impl.stop_har)
|
|
130
130
|
end
|
|
131
131
|
|
|
132
|
-
# -- inherited from EventEmitter --
|
|
133
|
-
# @nodoc
|
|
134
|
-
def off(event, callback)
|
|
135
|
-
event_emitter_proxy.off(event, callback)
|
|
136
|
-
end
|
|
137
|
-
|
|
138
132
|
# -- inherited from EventEmitter --
|
|
139
133
|
# @nodoc
|
|
140
134
|
def once(event, callback)
|
|
@@ -147,6 +141,12 @@ module Playwright
|
|
|
147
141
|
event_emitter_proxy.on(event, callback)
|
|
148
142
|
end
|
|
149
143
|
|
|
144
|
+
# -- inherited from EventEmitter --
|
|
145
|
+
# @nodoc
|
|
146
|
+
def off(event, callback)
|
|
147
|
+
event_emitter_proxy.off(event, callback)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
150
|
private def event_emitter_proxy
|
|
151
151
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
|
152
152
|
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Playwright
|
|
2
|
+
#
|
|
3
|
+
# `WebMCP` exposes the tools that a frame registers through the experimental `WebMCP` browser API, `navigator.modelContext`. It lists the tools and calls them.
|
|
4
|
+
#
|
|
5
|
+
# Instances are accessed through [`property: Frame.webmcp`]. [`property: Page.webmcp`] is the instance of the main frame.
|
|
6
|
+
#
|
|
7
|
+
# **NOTE**: WebMCP is an experimental browser feature. Chromium enables it with the `--enable-features=WebMCP` launch argument, Firefox with the `dom.modelcontext.enabled` and `dom.modelcontext.testing.enabled` preferences. WebKit does not implement it.
|
|
8
|
+
#
|
|
9
|
+
# Tool names, descriptions, input schemas and results are provided by the page, so treat them as untrusted input.
|
|
10
|
+
class WebMCP < PlaywrightApi
|
|
11
|
+
|
|
12
|
+
#
|
|
13
|
+
# Calls a tool registered by the frame and returns its result. The result is whatever the tool's `execute` function resolved to, typically an object with a `content` array. A result with `isError: true` is returned as is. The method throws when the tool is not registered or its `execute` function throws.
|
|
14
|
+
def call_tool(name, input: nil, timeout: nil)
|
|
15
|
+
wrap_impl(@impl.call_tool(unwrap_impl(name), input: unwrap_impl(input), timeout: unwrap_impl(timeout)))
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
#
|
|
19
|
+
# Returns the tools currently registered by the frame. Throws if the browser was launched without WebMCP support, see the note above for the launch options that enable it.
|
|
20
|
+
#
|
|
21
|
+
# [`property: Page.webmcp`] covers the main frame only, child frames list their tools through their own [`property: Frame.webmcp`].
|
|
22
|
+
def tools(timeout: nil)
|
|
23
|
+
wrap_impl(@impl.tools(timeout: unwrap_impl(timeout)))
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -34,12 +34,6 @@ module Playwright
|
|
|
34
34
|
wrap_impl(@impl.wait_for_event(unwrap_impl(event), predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
# -- inherited from EventEmitter --
|
|
38
|
-
# @nodoc
|
|
39
|
-
def off(event, callback)
|
|
40
|
-
event_emitter_proxy.off(event, callback)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
37
|
# -- inherited from EventEmitter --
|
|
44
38
|
# @nodoc
|
|
45
39
|
def once(event, callback)
|
|
@@ -52,6 +46,12 @@ module Playwright
|
|
|
52
46
|
event_emitter_proxy.on(event, callback)
|
|
53
47
|
end
|
|
54
48
|
|
|
49
|
+
# -- inherited from EventEmitter --
|
|
50
|
+
# @nodoc
|
|
51
|
+
def off(event, callback)
|
|
52
|
+
event_emitter_proxy.off(event, callback)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
55
|
private def event_emitter_proxy
|
|
56
56
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
|
57
57
|
end
|
|
@@ -63,20 +63,14 @@ module Playwright
|
|
|
63
63
|
wrap_impl(@impl.expect_event(unwrap_impl(event), predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
# @nodoc
|
|
67
|
-
def page=(req)
|
|
68
|
-
wrap_impl(@impl.page=(unwrap_impl(req)))
|
|
69
|
-
end
|
|
70
|
-
|
|
71
66
|
# @nodoc
|
|
72
67
|
def context=(req)
|
|
73
68
|
wrap_impl(@impl.context=(unwrap_impl(req)))
|
|
74
69
|
end
|
|
75
70
|
|
|
76
|
-
# -- inherited from EventEmitter --
|
|
77
71
|
# @nodoc
|
|
78
|
-
def
|
|
79
|
-
|
|
72
|
+
def page=(req)
|
|
73
|
+
wrap_impl(@impl.page=(unwrap_impl(req)))
|
|
80
74
|
end
|
|
81
75
|
|
|
82
76
|
# -- inherited from EventEmitter --
|
|
@@ -91,6 +85,12 @@ module Playwright
|
|
|
91
85
|
event_emitter_proxy.on(event, callback)
|
|
92
86
|
end
|
|
93
87
|
|
|
88
|
+
# -- inherited from EventEmitter --
|
|
89
|
+
# @nodoc
|
|
90
|
+
def off(event, callback)
|
|
91
|
+
event_emitter_proxy.off(event, callback)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
94
|
private def event_emitter_proxy
|
|
95
95
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
|
96
96
|
end
|
data/sig/playwright.rbs
CHANGED
|
@@ -150,7 +150,7 @@ module Playwright
|
|
|
150
150
|
def check: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
|
|
151
151
|
def child_frames: -> Array[untyped]
|
|
152
152
|
def click: (String selector, ?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
|
|
153
|
-
def content: -> String
|
|
153
|
+
def content: (?includeShadow: bool) -> String
|
|
154
154
|
def dblclick: (String selector, ?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
|
|
155
155
|
def dispatch_event: (String selector, String type_, ?eventInit: untyped, ?strict: bool, ?timeout: Float) -> void
|
|
156
156
|
def drag_and_drop: (String source, String target, ?force: bool, ?noWaitAfter: bool, ?scroll: ("auto" | "none"), ?sourcePosition: Hash[untyped, untyped], ?steps: Integer, ?strict: bool, ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
|
|
@@ -207,6 +207,8 @@ module Playwright
|
|
|
207
207
|
def wait_for_selector: (String selector, ?state: ("attached" | "detached" | "visible" | "hidden"), ?strict: bool, ?timeout: Float) -> (nil | ElementHandle)
|
|
208
208
|
def wait_for_timeout: (Float timeout) -> void
|
|
209
209
|
def wait_for_url: ((String | Regexp | function) url, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
|
|
210
|
+
|
|
211
|
+
attr_reader webmcp: WebMCP
|
|
210
212
|
end
|
|
211
213
|
|
|
212
214
|
class Worker
|
|
@@ -273,7 +275,7 @@ module Playwright
|
|
|
273
275
|
def check: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
|
|
274
276
|
def click: (String selector, ?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
|
|
275
277
|
def close: (?reason: String, ?runBeforeUnload: bool) -> void
|
|
276
|
-
def content: -> String
|
|
278
|
+
def content: (?includeShadow: bool) -> String
|
|
277
279
|
def context: -> BrowserContext
|
|
278
280
|
def dblclick: (String selector, ?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
|
|
279
281
|
def dispatch_event: (String selector, String type_, ?eventInit: untyped, ?strict: bool, ?timeout: Float) -> void
|
|
@@ -294,6 +296,7 @@ module Playwright
|
|
|
294
296
|
def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
295
297
|
def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
296
298
|
def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
299
|
+
def get_by_ref: (String ref) -> Locator
|
|
297
300
|
def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?description: (String | Regexp), ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
|
298
301
|
def get_by_test_id: ((String | Regexp) testId) -> Locator
|
|
299
302
|
def get_by_testid: ((String | Regexp) testId) -> Locator
|
|
@@ -382,6 +385,7 @@ module Playwright
|
|
|
382
385
|
attr_reader request: APIRequestContext
|
|
383
386
|
attr_reader screencast: untyped
|
|
384
387
|
attr_reader touchscreen: Touchscreen
|
|
388
|
+
attr_reader webmcp: WebMCP
|
|
385
389
|
end
|
|
386
390
|
|
|
387
391
|
class BrowserContext
|
|
@@ -439,8 +443,8 @@ module Playwright
|
|
|
439
443
|
def contexts: -> Array[untyped]
|
|
440
444
|
def connected?: -> bool
|
|
441
445
|
def new_browser_cdp_session: -> CDPSession
|
|
442
|
-
def new_context: (?acceptDownloads: bool, ?baseURL: String, ?bypassCSP: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: (Hash[untyped, untyped] | Array[untyped]), ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?storageState: ((String | File) | Hash[untyped, untyped]), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (BrowserContext) -> untyped } -> BrowserContext
|
|
443
|
-
def new_page: (?acceptDownloads: bool, ?baseURL: String, ?bypassCSP: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: (Hash[untyped, untyped] | Array[untyped]), ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?storageState: ((String | File) | Hash[untyped, untyped]), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (Page) -> untyped } -> Page
|
|
446
|
+
def new_context: (?acceptDownloads: bool, ?baseURL: String, ?bypassCSP: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: (Hash[untyped, untyped] | Array[untyped]), ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_fps: Integer, ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?storageState: ((String | File) | Hash[untyped, untyped]), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (BrowserContext) -> untyped } -> BrowserContext
|
|
447
|
+
def new_page: (?acceptDownloads: bool, ?baseURL: String, ?bypassCSP: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: (Hash[untyped, untyped] | Array[untyped]), ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_fps: Integer, ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?storageState: ((String | File) | Hash[untyped, untyped]), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (Page) -> untyped } -> Page
|
|
444
448
|
def bind: (String title, ?host: String, ?port: Integer, ?workspaceDir: String) -> Hash[untyped, untyped]
|
|
445
449
|
def start_tracing: (?page: Page, ?categories: Array[untyped], ?path: (String | File), ?screenshots: bool) -> void
|
|
446
450
|
def stop_tracing: -> String
|
|
@@ -453,7 +457,7 @@ module Playwright
|
|
|
453
457
|
def connect_over_cdp: (String endpointURL, ?artifactsDir: (String | File), ?headers: Hash[untyped, untyped], ?isLocal: bool, ?noDefaults: bool, ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
|
|
454
458
|
def executable_path: -> String
|
|
455
459
|
def launch: (?args: Array[untyped], ?artifactsDir: (String | File), ?channel: String, ?chromiumSandbox: bool, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?firefoxUserPrefs: Hash[untyped, untyped], ?handleSIGHUP: bool, ?handleSIGINT: bool, ?handleSIGTERM: bool, ?headless: bool, ?ignoreDefaultArgs: (bool | Array[untyped]), ?proxy: Hash[untyped, untyped], ?slowMo: Float, ?timeout: Float, ?tracesDir: (String | File)) ?{ (Browser) -> untyped } -> Browser
|
|
456
|
-
def launch_persistent_context: ((String | File) userDataDir, ?acceptDownloads: bool, ?args: Array[untyped], ?artifactsDir: (String | File), ?baseURL: String, ?bypassCSP: bool, ?channel: String, ?chromiumSandbox: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?extraHTTPHeaders: Hash[untyped, untyped], ?firefoxUserPrefs: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?handleSIGHUP: bool, ?handleSIGINT: bool, ?handleSIGTERM: bool, ?hasTouch: bool, ?headless: bool, ?httpCredentials: (Hash[untyped, untyped] | Array[untyped]), ?ignoreDefaultArgs: (bool | Array[untyped]), ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?slowMo: Float, ?strictSelectors: bool, ?timeout: Float, ?timezoneId: String, ?tracesDir: (String | File), ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (untyped) -> untyped } -> BrowserContext
|
|
460
|
+
def launch_persistent_context: ((String | File) userDataDir, ?acceptDownloads: bool, ?args: Array[untyped], ?artifactsDir: (String | File), ?baseURL: String, ?bypassCSP: bool, ?channel: String, ?chromiumSandbox: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?extraHTTPHeaders: Hash[untyped, untyped], ?firefoxUserPrefs: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?handleSIGHUP: bool, ?handleSIGINT: bool, ?handleSIGTERM: bool, ?hasTouch: bool, ?headless: bool, ?httpCredentials: (Hash[untyped, untyped] | Array[untyped]), ?ignoreDefaultArgs: (bool | Array[untyped]), ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_fps: Integer, ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?slowMo: Float, ?strictSelectors: bool, ?timeout: Float, ?timezoneId: String, ?tracesDir: (String | File), ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (untyped) -> untyped } -> BrowserContext
|
|
457
461
|
def name: -> String
|
|
458
462
|
end
|
|
459
463
|
|
|
@@ -467,8 +471,8 @@ module Playwright
|
|
|
467
471
|
end
|
|
468
472
|
|
|
469
473
|
class Tracing
|
|
470
|
-
def start: (?ariaSnapshots: bool, ?live: bool, ?name: String, ?screenshots: bool, ?screenSnapshots: bool, ?snapshots: bool, ?sources: bool, ?title: String) ->
|
|
471
|
-
def start_chunk: (?name: String, ?title: String) ->
|
|
474
|
+
def start: (?ariaSnapshots: bool, ?live: bool, ?name: String, ?screenshots: bool, ?screenSnapshots: bool, ?snapshots: bool, ?sources: bool, ?title: String) -> untyped
|
|
475
|
+
def start_chunk: (?name: String, ?title: String) -> untyped
|
|
472
476
|
def start_har: ((String | File) path, ?content: ("omit" | "embed" | "attach"), ?mode: ("full" | "minimal"), ?urlFilter: (String | Regexp)) -> untyped
|
|
473
477
|
def group: (String name, ?location: Hash[untyped, untyped]) -> untyped
|
|
474
478
|
def group_end: -> void
|
|
@@ -551,6 +555,7 @@ module Playwright
|
|
|
551
555
|
def visible: -> Locator
|
|
552
556
|
def wait_for: (?state: ("attached" | "detached" | "visible" | "hidden"), ?timeout: Float) -> void
|
|
553
557
|
def wait_for_function: (String expression, ?arg: untyped, ?timeout: Float) -> void
|
|
558
|
+
def within: (Locator locator) -> Locator
|
|
554
559
|
end
|
|
555
560
|
|
|
556
561
|
class FrameLocator
|
|
@@ -587,6 +592,9 @@ module Playwright
|
|
|
587
592
|
end
|
|
588
593
|
|
|
589
594
|
class APIRequestContext
|
|
595
|
+
def add_cookies: (Array[untyped] cookies) -> void
|
|
596
|
+
def clear_cookies: (?domain: (String | Regexp), ?name: (String | Regexp), ?path: (String | Regexp)) -> void
|
|
597
|
+
def cookies: (?urls: (String | Array[untyped])) -> Array[untyped]
|
|
590
598
|
def delete: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
591
599
|
def dispose: (?reason: String) -> void
|
|
592
600
|
def fetch: ((String | Request) urlOrRequest, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?method: String, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
@@ -677,10 +685,15 @@ module Playwright
|
|
|
677
685
|
|
|
678
686
|
class Credentials
|
|
679
687
|
def install: -> void
|
|
680
|
-
def create: (String rpId, ?id: String, ?privateKey: String, ?publicKey: String, ?userHandle: String) -> Hash[untyped, untyped]
|
|
688
|
+
def create: (String rpId, ?id: String, ?privateKey: String, ?publicKey: String, ?signCount: Integer, ?userHandle: String) -> Hash[untyped, untyped]
|
|
681
689
|
def delete: (String id) -> void
|
|
682
690
|
def get: (?id: String, ?rpId: String) -> Array[untyped]
|
|
683
691
|
end
|
|
684
692
|
|
|
693
|
+
class WebMCP
|
|
694
|
+
def call_tool: (String name, ?input: untyped, ?timeout: Float) -> untyped
|
|
695
|
+
def tools: (?timeout: Float) -> Array[untyped]
|
|
696
|
+
end
|
|
697
|
+
|
|
685
698
|
def self.create: (playwright_cli_executable_path: String) { (Playwright) -> void } -> void
|
|
686
699
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: playwright-ruby-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.64.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- YusukeIwaki
|
|
@@ -267,6 +267,7 @@ files:
|
|
|
267
267
|
- documentation/docs/api/selectors.md
|
|
268
268
|
- documentation/docs/api/touchscreen.md
|
|
269
269
|
- documentation/docs/api/tracing.md
|
|
270
|
+
- documentation/docs/api/web_mcp.md
|
|
270
271
|
- documentation/docs/api/web_socket.md
|
|
271
272
|
- documentation/docs/api/web_storage.md
|
|
272
273
|
- documentation/docs/api/worker.md
|
|
@@ -382,6 +383,7 @@ files:
|
|
|
382
383
|
- lib/playwright/version.rb
|
|
383
384
|
- lib/playwright/video.rb
|
|
384
385
|
- lib/playwright/waiter.rb
|
|
386
|
+
- lib/playwright/web_mcp_impl.rb
|
|
385
387
|
- lib/playwright/web_socket_client.rb
|
|
386
388
|
- lib/playwright/web_socket_transport.rb
|
|
387
389
|
- lib/playwright/web_storage_impl.rb
|
|
@@ -415,6 +417,7 @@ files:
|
|
|
415
417
|
- lib/playwright_api/selectors.rb
|
|
416
418
|
- lib/playwright_api/touchscreen.rb
|
|
417
419
|
- lib/playwright_api/tracing.rb
|
|
420
|
+
- lib/playwright_api/web_mcp.rb
|
|
418
421
|
- lib/playwright_api/web_socket.rb
|
|
419
422
|
- lib/playwright_api/web_storage.rb
|
|
420
423
|
- lib/playwright_api/worker.rb
|
|
@@ -443,5 +446,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
443
446
|
requirements: []
|
|
444
447
|
rubygems_version: 3.6.9
|
|
445
448
|
specification_version: 4
|
|
446
|
-
summary: The Ruby binding of playwright driver 1.
|
|
449
|
+
summary: The Ruby binding of playwright driver 1.64.1
|
|
447
450
|
test_files: []
|