playwright-ruby-client 1.52.0 → 1.54.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/documentation/docs/api/browser_context.md +1 -1
- data/documentation/docs/api/console_message.md +0 -3
- data/documentation/docs/api/experimental/android.md +10 -0
- data/documentation/docs/api/frame.md +1 -0
- data/documentation/docs/api/frame_locator.md +1 -0
- data/documentation/docs/api/locator.md +25 -1
- data/documentation/docs/api/locator_assertions.md +4 -7
- data/documentation/docs/api/mouse.md +2 -0
- data/documentation/docs/api/page.md +2 -1
- data/documentation/docs/api/selectors.md +10 -0
- data/documentation/docs/api/tracing.md +8 -0
- data/documentation/docs/include/api_coverage.md +3 -2
- data/lib/playwright/channel.rb +6 -3
- data/lib/playwright/channel_owners/android.rb +12 -0
- data/lib/playwright/channel_owners/android_device.rb +6 -5
- data/lib/playwright/channel_owners/api_request_context.rb +6 -1
- data/lib/playwright/channel_owners/browser.rb +37 -6
- data/lib/playwright/channel_owners/browser_context.rb +44 -23
- data/lib/playwright/channel_owners/browser_type.rb +45 -12
- data/lib/playwright/channel_owners/element_handle.rb +22 -17
- data/lib/playwright/channel_owners/frame.rb +65 -34
- data/lib/playwright/channel_owners/page.rb +19 -8
- data/lib/playwright/channel_owners/playwright.rb +10 -4
- data/lib/playwright/channel_owners/web_socket.rb +1 -1
- data/lib/playwright/connection.rb +3 -0
- data/lib/playwright/file_chooser_impl.rb +3 -2
- data/lib/playwright/frame_locator_impl.rb +5 -8
- data/lib/playwright/locator_assertions_impl.rb +64 -34
- data/lib/playwright/locator_impl.rb +27 -38
- data/lib/playwright/page_assertions_impl.rb +11 -9
- data/lib/playwright/selectors_impl.rb +45 -0
- data/lib/playwright/test.rb +21 -3
- data/lib/playwright/timeout_settings.rb +5 -0
- data/lib/playwright/transport.rb +1 -1
- data/lib/playwright/utils.rb +0 -33
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright_api/android.rb +12 -7
- data/lib/playwright_api/android_device.rb +8 -8
- data/lib/playwright_api/api_request_context.rb +6 -6
- data/lib/playwright_api/browser.rb +6 -6
- data/lib/playwright_api/browser_context.rb +11 -11
- data/lib/playwright_api/browser_type.rb +6 -6
- data/lib/playwright_api/cdp_session.rb +6 -6
- data/lib/playwright_api/console_message.rb +0 -4
- data/lib/playwright_api/dialog.rb +6 -6
- data/lib/playwright_api/element_handle.rb +6 -6
- data/lib/playwright_api/frame.rb +14 -8
- data/lib/playwright_api/frame_locator.rb +1 -0
- data/lib/playwright_api/js_handle.rb +6 -6
- data/lib/playwright_api/locator.rb +31 -4
- data/lib/playwright_api/locator_assertions.rb +3 -3
- data/lib/playwright_api/mouse.rb +2 -0
- data/lib/playwright_api/page.rb +14 -8
- data/lib/playwright_api/playwright.rb +8 -8
- data/lib/playwright_api/request.rb +8 -8
- data/lib/playwright_api/response.rb +8 -8
- data/lib/playwright_api/route.rb +6 -6
- data/lib/playwright_api/selectors.rb +1 -28
- data/lib/playwright_api/tracing.rb +14 -6
- data/lib/playwright_api/web_socket.rb +6 -6
- data/lib/playwright_api/worker.rb +8 -8
- data/sig/playwright.rbs +11 -2
- metadata +4 -4
- data/lib/playwright/channel_owners/selectors.rb +0 -26
data/lib/playwright_api/page.rb
CHANGED
@@ -716,6 +716,7 @@ module Playwright
|
|
716
716
|
def get_by_test_id(testId)
|
717
717
|
wrap_impl(@impl.get_by_test_id(unwrap_impl(testId)))
|
718
718
|
end
|
719
|
+
alias_method :get_by_testid, :get_by_test_id
|
719
720
|
|
720
721
|
#
|
721
722
|
# Allows locating elements that contain given text.
|
@@ -1792,6 +1793,16 @@ module Playwright
|
|
1792
1793
|
raise NotImplementedError.new('wait_for_event is not implemented yet.')
|
1793
1794
|
end
|
1794
1795
|
|
1796
|
+
# @nodoc
|
1797
|
+
def guid
|
1798
|
+
wrap_impl(@impl.guid)
|
1799
|
+
end
|
1800
|
+
|
1801
|
+
# @nodoc
|
1802
|
+
def snapshot_for_ai
|
1803
|
+
wrap_impl(@impl.snapshot_for_ai)
|
1804
|
+
end
|
1805
|
+
|
1795
1806
|
# @nodoc
|
1796
1807
|
def start_js_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
|
1797
1808
|
wrap_impl(@impl.start_js_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
|
@@ -1817,9 +1828,10 @@ module Playwright
|
|
1817
1828
|
wrap_impl(@impl.owned_context=(unwrap_impl(req)))
|
1818
1829
|
end
|
1819
1830
|
|
1831
|
+
# -- inherited from EventEmitter --
|
1820
1832
|
# @nodoc
|
1821
|
-
def
|
1822
|
-
|
1833
|
+
def once(event, callback)
|
1834
|
+
event_emitter_proxy.once(event, callback)
|
1823
1835
|
end
|
1824
1836
|
|
1825
1837
|
# -- inherited from EventEmitter --
|
@@ -1834,12 +1846,6 @@ module Playwright
|
|
1834
1846
|
event_emitter_proxy.off(event, callback)
|
1835
1847
|
end
|
1836
1848
|
|
1837
|
-
# -- inherited from EventEmitter --
|
1838
|
-
# @nodoc
|
1839
|
-
def once(event, callback)
|
1840
|
-
event_emitter_proxy.once(event, callback)
|
1841
|
-
end
|
1842
|
-
|
1843
1849
|
private def event_emitter_proxy
|
1844
1850
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
1845
1851
|
end
|
@@ -93,14 +93,20 @@ module Playwright
|
|
93
93
|
raise NotImplementedError.new('stop is not implemented yet.')
|
94
94
|
end
|
95
95
|
|
96
|
+
# @nodoc
|
97
|
+
def electron
|
98
|
+
wrap_impl(@impl.electron)
|
99
|
+
end
|
100
|
+
|
96
101
|
# @nodoc
|
97
102
|
def android
|
98
103
|
wrap_impl(@impl.android)
|
99
104
|
end
|
100
105
|
|
106
|
+
# -- inherited from EventEmitter --
|
101
107
|
# @nodoc
|
102
|
-
def
|
103
|
-
|
108
|
+
def once(event, callback)
|
109
|
+
event_emitter_proxy.once(event, callback)
|
104
110
|
end
|
105
111
|
|
106
112
|
# -- inherited from EventEmitter --
|
@@ -115,12 +121,6 @@ module Playwright
|
|
115
121
|
event_emitter_proxy.off(event, callback)
|
116
122
|
end
|
117
123
|
|
118
|
-
# -- inherited from EventEmitter --
|
119
|
-
# @nodoc
|
120
|
-
def once(event, callback)
|
121
|
-
event_emitter_proxy.once(event, callback)
|
122
|
-
end
|
123
|
-
|
124
124
|
private def event_emitter_proxy
|
125
125
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
126
126
|
end
|
@@ -195,14 +195,20 @@ module Playwright
|
|
195
195
|
wrap_impl(@impl.url)
|
196
196
|
end
|
197
197
|
|
198
|
+
# @nodoc
|
199
|
+
def apply_fallback_overrides(overrides)
|
200
|
+
wrap_impl(@impl.apply_fallback_overrides(unwrap_impl(overrides)))
|
201
|
+
end
|
202
|
+
|
198
203
|
# @nodoc
|
199
204
|
def header_values(name)
|
200
205
|
wrap_impl(@impl.header_values(unwrap_impl(name)))
|
201
206
|
end
|
202
207
|
|
208
|
+
# -- inherited from EventEmitter --
|
203
209
|
# @nodoc
|
204
|
-
def
|
205
|
-
|
210
|
+
def once(event, callback)
|
211
|
+
event_emitter_proxy.once(event, callback)
|
206
212
|
end
|
207
213
|
|
208
214
|
# -- inherited from EventEmitter --
|
@@ -217,12 +223,6 @@ module Playwright
|
|
217
223
|
event_emitter_proxy.off(event, callback)
|
218
224
|
end
|
219
225
|
|
220
|
-
# -- inherited from EventEmitter --
|
221
|
-
# @nodoc
|
222
|
-
def once(event, callback)
|
223
|
-
event_emitter_proxy.once(event, callback)
|
224
|
-
end
|
225
|
-
|
226
226
|
private def event_emitter_proxy
|
227
227
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
228
228
|
end
|
@@ -117,14 +117,20 @@ module Playwright
|
|
117
117
|
wrap_impl(@impl.url)
|
118
118
|
end
|
119
119
|
|
120
|
+
# @nodoc
|
121
|
+
def from_service_worker?
|
122
|
+
wrap_impl(@impl.from_service_worker?)
|
123
|
+
end
|
124
|
+
|
120
125
|
# @nodoc
|
121
126
|
def ok?
|
122
127
|
wrap_impl(@impl.ok?)
|
123
128
|
end
|
124
129
|
|
130
|
+
# -- inherited from EventEmitter --
|
125
131
|
# @nodoc
|
126
|
-
def
|
127
|
-
|
132
|
+
def once(event, callback)
|
133
|
+
event_emitter_proxy.once(event, callback)
|
128
134
|
end
|
129
135
|
|
130
136
|
# -- inherited from EventEmitter --
|
@@ -139,12 +145,6 @@ module Playwright
|
|
139
145
|
event_emitter_proxy.off(event, callback)
|
140
146
|
end
|
141
147
|
|
142
|
-
# -- inherited from EventEmitter --
|
143
|
-
# @nodoc
|
144
|
-
def once(event, callback)
|
145
|
-
event_emitter_proxy.once(event, callback)
|
146
|
-
end
|
147
|
-
|
148
148
|
private def event_emitter_proxy
|
149
149
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
150
150
|
end
|
data/lib/playwright_api/route.rb
CHANGED
@@ -176,20 +176,20 @@ module Playwright
|
|
176
176
|
|
177
177
|
# -- inherited from EventEmitter --
|
178
178
|
# @nodoc
|
179
|
-
def
|
180
|
-
event_emitter_proxy.
|
179
|
+
def once(event, callback)
|
180
|
+
event_emitter_proxy.once(event, callback)
|
181
181
|
end
|
182
182
|
|
183
183
|
# -- inherited from EventEmitter --
|
184
184
|
# @nodoc
|
185
|
-
def
|
186
|
-
event_emitter_proxy.
|
185
|
+
def on(event, callback)
|
186
|
+
event_emitter_proxy.on(event, callback)
|
187
187
|
end
|
188
188
|
|
189
189
|
# -- inherited from EventEmitter --
|
190
190
|
# @nodoc
|
191
|
-
def
|
192
|
-
event_emitter_proxy.
|
191
|
+
def off(event, callback)
|
192
|
+
event_emitter_proxy.off(event, callback)
|
193
193
|
end
|
194
194
|
|
195
195
|
private def event_emitter_proxy
|
@@ -52,35 +52,8 @@ module Playwright
|
|
52
52
|
#
|
53
53
|
# Defines custom attribute name to be used in [`method: Page.getByTestId`]. `data-testid` is used by default.
|
54
54
|
def set_test_id_attribute(attributeName)
|
55
|
-
|
55
|
+
wrap_impl(@impl.set_test_id_attribute(unwrap_impl(attributeName)))
|
56
56
|
end
|
57
57
|
alias_method :test_id_attribute=, :set_test_id_attribute
|
58
|
-
|
59
|
-
# @nodoc
|
60
|
-
def text_id_attribute=(attribute_name)
|
61
|
-
wrap_impl(@impl.text_id_attribute=(unwrap_impl(attribute_name)))
|
62
|
-
end
|
63
|
-
|
64
|
-
# -- inherited from EventEmitter --
|
65
|
-
# @nodoc
|
66
|
-
def on(event, callback)
|
67
|
-
event_emitter_proxy.on(event, callback)
|
68
|
-
end
|
69
|
-
|
70
|
-
# -- inherited from EventEmitter --
|
71
|
-
# @nodoc
|
72
|
-
def off(event, callback)
|
73
|
-
event_emitter_proxy.off(event, callback)
|
74
|
-
end
|
75
|
-
|
76
|
-
# -- inherited from EventEmitter --
|
77
|
-
# @nodoc
|
78
|
-
def once(event, callback)
|
79
|
-
event_emitter_proxy.once(event, callback)
|
80
|
-
end
|
81
|
-
|
82
|
-
private def event_emitter_proxy
|
83
|
-
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
84
|
-
end
|
85
58
|
end
|
86
59
|
end
|
@@ -2,6 +2,10 @@ module Playwright
|
|
2
2
|
#
|
3
3
|
# API for collecting and saving Playwright traces. Playwright traces can be opened in [Trace Viewer](../trace-viewer.md) after Playwright script runs.
|
4
4
|
#
|
5
|
+
# **NOTE**: You probably want to [enable tracing in your config file](https://playwright.dev/docs/api/class-testoptions#test-options-trace) instead of using `context.tracing`.
|
6
|
+
#
|
7
|
+
# The `context.tracing` API captures browser operations and network activity, but it doesn't record test assertions (like `expect` calls). We recommend [enabling tracing through Playwright Test configuration](https://playwright.dev/docs/api/class-testoptions#test-options-trace), which includes those assertions and provides a more complete trace for debugging test failures.
|
8
|
+
#
|
5
9
|
# Start recording a trace before performing actions. At the end, stop tracing and save it to a file.
|
6
10
|
#
|
7
11
|
# ```python sync
|
@@ -17,6 +21,10 @@ module Playwright
|
|
17
21
|
#
|
18
22
|
# Start tracing.
|
19
23
|
#
|
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
|
+
#
|
26
|
+
# The `context.tracing` API captures browser operations and network activity, but it doesn't record test assertions (like `expect` calls). We recommend [enabling tracing through Playwright Test configuration](https://playwright.dev/docs/api/class-testoptions#test-options-trace), which includes those assertions and provides a more complete trace for debugging test failures.
|
27
|
+
#
|
20
28
|
# **Usage**
|
21
29
|
#
|
22
30
|
# ```python sync
|
@@ -97,20 +105,20 @@ module Playwright
|
|
97
105
|
|
98
106
|
# -- inherited from EventEmitter --
|
99
107
|
# @nodoc
|
100
|
-
def
|
101
|
-
event_emitter_proxy.
|
108
|
+
def once(event, callback)
|
109
|
+
event_emitter_proxy.once(event, callback)
|
102
110
|
end
|
103
111
|
|
104
112
|
# -- inherited from EventEmitter --
|
105
113
|
# @nodoc
|
106
|
-
def
|
107
|
-
event_emitter_proxy.
|
114
|
+
def on(event, callback)
|
115
|
+
event_emitter_proxy.on(event, callback)
|
108
116
|
end
|
109
117
|
|
110
118
|
# -- inherited from EventEmitter --
|
111
119
|
# @nodoc
|
112
|
-
def
|
113
|
-
event_emitter_proxy.
|
120
|
+
def off(event, callback)
|
121
|
+
event_emitter_proxy.off(event, callback)
|
114
122
|
end
|
115
123
|
|
116
124
|
private def event_emitter_proxy
|
@@ -36,20 +36,20 @@ module Playwright
|
|
36
36
|
|
37
37
|
# -- inherited from EventEmitter --
|
38
38
|
# @nodoc
|
39
|
-
def
|
40
|
-
event_emitter_proxy.
|
39
|
+
def once(event, callback)
|
40
|
+
event_emitter_proxy.once(event, callback)
|
41
41
|
end
|
42
42
|
|
43
43
|
# -- inherited from EventEmitter --
|
44
44
|
# @nodoc
|
45
|
-
def
|
46
|
-
event_emitter_proxy.
|
45
|
+
def on(event, callback)
|
46
|
+
event_emitter_proxy.on(event, callback)
|
47
47
|
end
|
48
48
|
|
49
49
|
# -- inherited from EventEmitter --
|
50
50
|
# @nodoc
|
51
|
-
def
|
52
|
-
event_emitter_proxy.
|
51
|
+
def off(event, callback)
|
52
|
+
event_emitter_proxy.off(event, callback)
|
53
53
|
end
|
54
54
|
|
55
55
|
private def event_emitter_proxy
|
@@ -46,14 +46,20 @@ module Playwright
|
|
46
46
|
wrap_impl(@impl.url)
|
47
47
|
end
|
48
48
|
|
49
|
+
# @nodoc
|
50
|
+
def page=(req)
|
51
|
+
wrap_impl(@impl.page=(unwrap_impl(req)))
|
52
|
+
end
|
53
|
+
|
49
54
|
# @nodoc
|
50
55
|
def context=(req)
|
51
56
|
wrap_impl(@impl.context=(unwrap_impl(req)))
|
52
57
|
end
|
53
58
|
|
59
|
+
# -- inherited from EventEmitter --
|
54
60
|
# @nodoc
|
55
|
-
def
|
56
|
-
|
61
|
+
def once(event, callback)
|
62
|
+
event_emitter_proxy.once(event, callback)
|
57
63
|
end
|
58
64
|
|
59
65
|
# -- inherited from EventEmitter --
|
@@ -68,12 +74,6 @@ module Playwright
|
|
68
74
|
event_emitter_proxy.off(event, callback)
|
69
75
|
end
|
70
76
|
|
71
|
-
# -- inherited from EventEmitter --
|
72
|
-
# @nodoc
|
73
|
-
def once(event, callback)
|
74
|
-
event_emitter_proxy.once(event, callback)
|
75
|
-
end
|
76
|
-
|
77
77
|
private def event_emitter_proxy
|
78
78
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
79
79
|
end
|
data/sig/playwright.rbs
CHANGED
@@ -170,6 +170,7 @@ module Playwright
|
|
170
170
|
def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
|
171
171
|
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, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
172
172
|
def get_by_test_id: ((String | Regexp) testId) -> Locator
|
173
|
+
def get_by_testid: ((String | Regexp) testId) -> Locator
|
173
174
|
def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
174
175
|
def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
|
175
176
|
def goto: (String url, ?referer: String, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
|
@@ -218,6 +219,8 @@ module Playwright
|
|
218
219
|
|
219
220
|
class Selectors
|
220
221
|
def register: (String name, ?script: String, ?contentScript: bool, ?path: (String | File)) -> void
|
222
|
+
def set_test_id_attribute: (String attributeName) -> void
|
223
|
+
def test_id_attribute=: (String attributeName) -> void
|
221
224
|
end
|
222
225
|
|
223
226
|
class Clock
|
@@ -237,7 +240,7 @@ module Playwright
|
|
237
240
|
def location: -> Hash[untyped, untyped]
|
238
241
|
def page: -> (nil | Page)
|
239
242
|
def text: -> String
|
240
|
-
def type: ->
|
243
|
+
def type: -> ("log" | "debug" | "info" | "error" | "warning" | "dir" | "dirxml" | "table" | "trace" | "clear" | "startGroup" | "startGroupCollapsed" | "endGroup" | "assert" | "profile" | "profileEnd" | "count" | "timeEnd")
|
241
244
|
end
|
242
245
|
|
243
246
|
class Dialog
|
@@ -291,6 +294,7 @@ module Playwright
|
|
291
294
|
def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
|
292
295
|
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, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
293
296
|
def get_by_test_id: ((String | Regexp) testId) -> Locator
|
297
|
+
def get_by_testid: ((String | Regexp) testId) -> Locator
|
294
298
|
def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
295
299
|
def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
|
296
300
|
def go_back: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
|
@@ -456,7 +460,7 @@ module Playwright
|
|
456
460
|
def all_inner_texts: -> Array[untyped]
|
457
461
|
def all_text_contents: -> Array[untyped]
|
458
462
|
def and: (Locator locator) -> Locator
|
459
|
-
def aria_snapshot: (?
|
463
|
+
def aria_snapshot: (?timeout: Float) -> String
|
460
464
|
def blur: (?timeout: Float) -> void
|
461
465
|
def bounding_box: (?timeout: Float) -> (nil | Hash[untyped, untyped])
|
462
466
|
def check: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
|
@@ -464,6 +468,7 @@ module Playwright
|
|
464
468
|
def click: (?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
|
465
469
|
def count: -> Integer
|
466
470
|
def dblclick: (?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
|
471
|
+
def describe: (String description) -> Locator
|
467
472
|
def dispatch_event: (String type_, ?eventInit: untyped, ?timeout: Float) -> void
|
468
473
|
def drag_to: (Locator target, ?force: bool, ?noWaitAfter: bool, ?sourcePosition: Hash[untyped, untyped], ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
|
469
474
|
def element_handle: (?timeout: Float) -> ElementHandle
|
@@ -484,6 +489,7 @@ module Playwright
|
|
484
489
|
def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
|
485
490
|
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, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
486
491
|
def get_by_test_id: ((String | Regexp) testId) -> Locator
|
492
|
+
def get_by_testid: ((String | Regexp) testId) -> Locator
|
487
493
|
def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
488
494
|
def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
|
489
495
|
def highlight: -> void
|
@@ -527,6 +533,7 @@ module Playwright
|
|
527
533
|
def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
|
528
534
|
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, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
529
535
|
def get_by_test_id: ((String | Regexp) testId) -> Locator
|
536
|
+
def get_by_testid: ((String | Regexp) testId) -> Locator
|
530
537
|
def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
531
538
|
def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
|
532
539
|
def last: -> FrameLocator
|
@@ -623,6 +630,8 @@ module Playwright
|
|
623
630
|
|
624
631
|
class Android
|
625
632
|
def devices: (?host: String, ?omitDriverInstall: bool, ?port: Integer) -> Array[untyped]
|
633
|
+
def set_default_timeout: (Float timeout) -> void
|
634
|
+
def default_timeout=: (Float timeout) -> void
|
626
635
|
end
|
627
636
|
|
628
637
|
class AndroidDevice
|
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.54.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
@@ -303,7 +303,6 @@ files:
|
|
303
303
|
- lib/playwright/channel_owners/request.rb
|
304
304
|
- lib/playwright/channel_owners/response.rb
|
305
305
|
- lib/playwright/channel_owners/route.rb
|
306
|
-
- lib/playwright/channel_owners/selectors.rb
|
307
306
|
- lib/playwright/channel_owners/stream.rb
|
308
307
|
- lib/playwright/channel_owners/tracing.rb
|
309
308
|
- lib/playwright/channel_owners/web_socket.rb
|
@@ -339,6 +338,7 @@ files:
|
|
339
338
|
- lib/playwright/raw_headers.rb
|
340
339
|
- lib/playwright/route_handler.rb
|
341
340
|
- lib/playwright/select_option_values.rb
|
341
|
+
- lib/playwright/selectors_impl.rb
|
342
342
|
- lib/playwright/test.rb
|
343
343
|
- lib/playwright/timeout_settings.rb
|
344
344
|
- lib/playwright/touchscreen_impl.rb
|
@@ -407,7 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
407
407
|
- !ruby/object:Gem::Version
|
408
408
|
version: '0'
|
409
409
|
requirements: []
|
410
|
-
rubygems_version: 3.6.
|
410
|
+
rubygems_version: 3.6.9
|
411
411
|
specification_version: 4
|
412
|
-
summary: The Ruby binding of playwright driver 1.
|
412
|
+
summary: The Ruby binding of playwright driver 1.54.1
|
413
413
|
test_files: []
|
@@ -1,26 +0,0 @@
|
|
1
|
-
module Playwright
|
2
|
-
# https://github.com/microsoft/playwright-python/blob/master/playwright/_impl/_selectors.py
|
3
|
-
define_channel_owner :Selectors do
|
4
|
-
def register(name, contentScript: nil, path: nil, script: nil)
|
5
|
-
source =
|
6
|
-
if path
|
7
|
-
File.read(path)
|
8
|
-
elsif script
|
9
|
-
script
|
10
|
-
else
|
11
|
-
raise ArgumentError.new('Either path or script parameter must be specified')
|
12
|
-
end
|
13
|
-
params = { name: name, source: source }
|
14
|
-
if contentScript
|
15
|
-
params[:contentScript] = true
|
16
|
-
end
|
17
|
-
@channel.send_message_to_server('register', params)
|
18
|
-
|
19
|
-
nil
|
20
|
-
end
|
21
|
-
|
22
|
-
def text_id_attribute=(attribute_name)
|
23
|
-
::Playwright::LocatorUtils.instance_variable_set(:@test_id_attribute_name, attribute_name)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|