playwright-ruby-client 1.52.0 → 1.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/documentation/docs/api/experimental/android.md +10 -0
- data/documentation/docs/api/locator.md +24 -1
- data/documentation/docs/api/locator_assertions.md +4 -7
- data/documentation/docs/api/page.md +1 -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 +40 -33
- 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 +31 -20
- data/lib/playwright/page_assertions_impl.rb +10 -8
- 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/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 +10 -10
- data/lib/playwright_api/browser_type.rb +6 -6
- data/lib/playwright_api/cdp_session.rb +6 -6
- data/lib/playwright_api/dialog.rb +6 -6
- data/lib/playwright_api/element_handle.rb +6 -6
- data/lib/playwright_api/frame.rb +6 -6
- data/lib/playwright_api/js_handle.rb +6 -6
- data/lib/playwright_api/locator.rb +30 -4
- data/lib/playwright_api/locator_assertions.rb +3 -3
- data/lib/playwright_api/page.rb +13 -8
- data/lib/playwright_api/playwright.rb +6 -6
- data/lib/playwright_api/request.rb +8 -8
- data/lib/playwright_api/response.rb +6 -6
- 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 +6 -1
- metadata +4 -4
- data/lib/playwright/channel_owners/selectors.rb +0 -26
data/lib/playwright/version.rb
CHANGED
@@ -34,26 +34,31 @@ module Playwright
|
|
34
34
|
#
|
35
35
|
# This setting will change the default maximum time for all the methods accepting `timeout` option.
|
36
36
|
def set_default_timeout(timeout)
|
37
|
-
|
37
|
+
wrap_impl(@impl.set_default_timeout(unwrap_impl(timeout)))
|
38
38
|
end
|
39
39
|
alias_method :default_timeout=, :set_default_timeout
|
40
40
|
|
41
|
+
# @nodoc
|
42
|
+
def set_default_navigation_timeout(timeout)
|
43
|
+
wrap_impl(@impl.set_default_navigation_timeout(unwrap_impl(timeout)))
|
44
|
+
end
|
45
|
+
|
41
46
|
# -- inherited from EventEmitter --
|
42
47
|
# @nodoc
|
43
|
-
def
|
44
|
-
event_emitter_proxy.
|
48
|
+
def once(event, callback)
|
49
|
+
event_emitter_proxy.once(event, callback)
|
45
50
|
end
|
46
51
|
|
47
52
|
# -- inherited from EventEmitter --
|
48
53
|
# @nodoc
|
49
|
-
def
|
50
|
-
event_emitter_proxy.
|
54
|
+
def on(event, callback)
|
55
|
+
event_emitter_proxy.on(event, callback)
|
51
56
|
end
|
52
57
|
|
53
58
|
# -- inherited from EventEmitter --
|
54
59
|
# @nodoc
|
55
|
-
def
|
56
|
-
event_emitter_proxy.
|
60
|
+
def off(event, callback)
|
61
|
+
event_emitter_proxy.off(event, callback)
|
57
62
|
end
|
58
63
|
|
59
64
|
private def event_emitter_proxy
|
@@ -194,14 +194,20 @@ module Playwright
|
|
194
194
|
raise NotImplementedError.new('web_views is not implemented yet.')
|
195
195
|
end
|
196
196
|
|
197
|
+
# @nodoc
|
198
|
+
def tap_on(selector, duration: nil, timeout: nil)
|
199
|
+
wrap_impl(@impl.tap_on(unwrap_impl(selector), duration: unwrap_impl(duration), timeout: unwrap_impl(timeout)))
|
200
|
+
end
|
201
|
+
|
197
202
|
# @nodoc
|
198
203
|
def should_close_connection_on_close!
|
199
204
|
wrap_impl(@impl.should_close_connection_on_close!)
|
200
205
|
end
|
201
206
|
|
207
|
+
# -- inherited from EventEmitter --
|
202
208
|
# @nodoc
|
203
|
-
def
|
204
|
-
|
209
|
+
def once(event, callback)
|
210
|
+
event_emitter_proxy.once(event, callback)
|
205
211
|
end
|
206
212
|
|
207
213
|
# -- inherited from EventEmitter --
|
@@ -216,12 +222,6 @@ module Playwright
|
|
216
222
|
event_emitter_proxy.off(event, callback)
|
217
223
|
end
|
218
224
|
|
219
|
-
# -- inherited from EventEmitter --
|
220
|
-
# @nodoc
|
221
|
-
def once(event, callback)
|
222
|
-
event_emitter_proxy.once(event, callback)
|
223
|
-
end
|
224
|
-
|
225
225
|
private def event_emitter_proxy
|
226
226
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
227
227
|
end
|
@@ -288,20 +288,20 @@ module Playwright
|
|
288
288
|
|
289
289
|
# -- inherited from EventEmitter --
|
290
290
|
# @nodoc
|
291
|
-
def
|
292
|
-
event_emitter_proxy.
|
291
|
+
def once(event, callback)
|
292
|
+
event_emitter_proxy.once(event, callback)
|
293
293
|
end
|
294
294
|
|
295
295
|
# -- inherited from EventEmitter --
|
296
296
|
# @nodoc
|
297
|
-
def
|
298
|
-
event_emitter_proxy.
|
297
|
+
def on(event, callback)
|
298
|
+
event_emitter_proxy.on(event, callback)
|
299
299
|
end
|
300
300
|
|
301
301
|
# -- inherited from EventEmitter --
|
302
302
|
# @nodoc
|
303
|
-
def
|
304
|
-
event_emitter_proxy.
|
303
|
+
def off(event, callback)
|
304
|
+
event_emitter_proxy.off(event, callback)
|
305
305
|
end
|
306
306
|
|
307
307
|
private def event_emitter_proxy
|
@@ -205,20 +205,20 @@ module Playwright
|
|
205
205
|
|
206
206
|
# -- inherited from EventEmitter --
|
207
207
|
# @nodoc
|
208
|
-
def
|
209
|
-
event_emitter_proxy.
|
208
|
+
def once(event, callback)
|
209
|
+
event_emitter_proxy.once(event, callback)
|
210
210
|
end
|
211
211
|
|
212
212
|
# -- inherited from EventEmitter --
|
213
213
|
# @nodoc
|
214
|
-
def
|
215
|
-
event_emitter_proxy.
|
214
|
+
def on(event, callback)
|
215
|
+
event_emitter_proxy.on(event, callback)
|
216
216
|
end
|
217
217
|
|
218
218
|
# -- inherited from EventEmitter --
|
219
219
|
# @nodoc
|
220
|
-
def
|
221
|
-
event_emitter_proxy.
|
220
|
+
def off(event, callback)
|
221
|
+
event_emitter_proxy.off(event, callback)
|
222
222
|
end
|
223
223
|
|
224
224
|
private def event_emitter_proxy
|
@@ -474,8 +474,8 @@ module Playwright
|
|
474
474
|
end
|
475
475
|
|
476
476
|
# @nodoc
|
477
|
-
def
|
478
|
-
wrap_impl(@impl.
|
477
|
+
def owner_page=(req)
|
478
|
+
wrap_impl(@impl.owner_page=(unwrap_impl(req)))
|
479
479
|
end
|
480
480
|
|
481
481
|
# @nodoc
|
@@ -484,26 +484,26 @@ module Playwright
|
|
484
484
|
end
|
485
485
|
|
486
486
|
# @nodoc
|
487
|
-
def
|
488
|
-
wrap_impl(@impl.
|
487
|
+
def browser=(req)
|
488
|
+
wrap_impl(@impl.browser=(unwrap_impl(req)))
|
489
489
|
end
|
490
490
|
|
491
491
|
# -- inherited from EventEmitter --
|
492
492
|
# @nodoc
|
493
|
-
def
|
494
|
-
event_emitter_proxy.
|
493
|
+
def once(event, callback)
|
494
|
+
event_emitter_proxy.once(event, callback)
|
495
495
|
end
|
496
496
|
|
497
497
|
# -- inherited from EventEmitter --
|
498
498
|
# @nodoc
|
499
|
-
def
|
500
|
-
event_emitter_proxy.
|
499
|
+
def on(event, callback)
|
500
|
+
event_emitter_proxy.on(event, callback)
|
501
501
|
end
|
502
502
|
|
503
503
|
# -- inherited from EventEmitter --
|
504
504
|
# @nodoc
|
505
|
-
def
|
506
|
-
event_emitter_proxy.
|
505
|
+
def off(event, callback)
|
506
|
+
event_emitter_proxy.off(event, callback)
|
507
507
|
end
|
508
508
|
|
509
509
|
private def event_emitter_proxy
|
@@ -182,20 +182,20 @@ module Playwright
|
|
182
182
|
|
183
183
|
# -- inherited from EventEmitter --
|
184
184
|
# @nodoc
|
185
|
-
def
|
186
|
-
event_emitter_proxy.
|
185
|
+
def once(event, callback)
|
186
|
+
event_emitter_proxy.once(event, callback)
|
187
187
|
end
|
188
188
|
|
189
189
|
# -- inherited from EventEmitter --
|
190
190
|
# @nodoc
|
191
|
-
def
|
192
|
-
event_emitter_proxy.
|
191
|
+
def on(event, callback)
|
192
|
+
event_emitter_proxy.on(event, callback)
|
193
193
|
end
|
194
194
|
|
195
195
|
# -- inherited from EventEmitter --
|
196
196
|
# @nodoc
|
197
|
-
def
|
198
|
-
event_emitter_proxy.
|
197
|
+
def off(event, callback)
|
198
|
+
event_emitter_proxy.off(event, callback)
|
199
199
|
end
|
200
200
|
|
201
201
|
private def event_emitter_proxy
|
@@ -33,20 +33,20 @@ module Playwright
|
|
33
33
|
|
34
34
|
# -- inherited from EventEmitter --
|
35
35
|
# @nodoc
|
36
|
-
def
|
37
|
-
event_emitter_proxy.
|
36
|
+
def once(event, callback)
|
37
|
+
event_emitter_proxy.once(event, callback)
|
38
38
|
end
|
39
39
|
|
40
40
|
# -- inherited from EventEmitter --
|
41
41
|
# @nodoc
|
42
|
-
def
|
43
|
-
event_emitter_proxy.
|
42
|
+
def on(event, callback)
|
43
|
+
event_emitter_proxy.on(event, callback)
|
44
44
|
end
|
45
45
|
|
46
46
|
# -- inherited from EventEmitter --
|
47
47
|
# @nodoc
|
48
|
-
def
|
49
|
-
event_emitter_proxy.
|
48
|
+
def off(event, callback)
|
49
|
+
event_emitter_proxy.off(event, callback)
|
50
50
|
end
|
51
51
|
|
52
52
|
private def event_emitter_proxy
|
@@ -70,20 +70,20 @@ module Playwright
|
|
70
70
|
|
71
71
|
# -- inherited from EventEmitter --
|
72
72
|
# @nodoc
|
73
|
-
def
|
74
|
-
event_emitter_proxy.
|
73
|
+
def once(event, callback)
|
74
|
+
event_emitter_proxy.once(event, callback)
|
75
75
|
end
|
76
76
|
|
77
77
|
# -- inherited from EventEmitter --
|
78
78
|
# @nodoc
|
79
|
-
def
|
80
|
-
event_emitter_proxy.
|
79
|
+
def on(event, callback)
|
80
|
+
event_emitter_proxy.on(event, callback)
|
81
81
|
end
|
82
82
|
|
83
83
|
# -- inherited from EventEmitter --
|
84
84
|
# @nodoc
|
85
|
-
def
|
86
|
-
event_emitter_proxy.
|
85
|
+
def off(event, callback)
|
86
|
+
event_emitter_proxy.off(event, callback)
|
87
87
|
end
|
88
88
|
|
89
89
|
private def event_emitter_proxy
|
@@ -574,20 +574,20 @@ module Playwright
|
|
574
574
|
|
575
575
|
# -- inherited from EventEmitter --
|
576
576
|
# @nodoc
|
577
|
-
def
|
578
|
-
event_emitter_proxy.
|
577
|
+
def once(event, callback)
|
578
|
+
event_emitter_proxy.once(event, callback)
|
579
579
|
end
|
580
580
|
|
581
581
|
# -- inherited from EventEmitter --
|
582
582
|
# @nodoc
|
583
|
-
def
|
584
|
-
event_emitter_proxy.
|
583
|
+
def on(event, callback)
|
584
|
+
event_emitter_proxy.on(event, callback)
|
585
585
|
end
|
586
586
|
|
587
587
|
# -- inherited from EventEmitter --
|
588
588
|
# @nodoc
|
589
|
-
def
|
590
|
-
event_emitter_proxy.
|
589
|
+
def off(event, callback)
|
590
|
+
event_emitter_proxy.off(event, callback)
|
591
591
|
end
|
592
592
|
|
593
593
|
private def event_emitter_proxy
|
data/lib/playwright_api/frame.rb
CHANGED
@@ -1050,20 +1050,20 @@ module Playwright
|
|
1050
1050
|
|
1051
1051
|
# -- inherited from EventEmitter --
|
1052
1052
|
# @nodoc
|
1053
|
-
def
|
1054
|
-
event_emitter_proxy.
|
1053
|
+
def once(event, callback)
|
1054
|
+
event_emitter_proxy.once(event, callback)
|
1055
1055
|
end
|
1056
1056
|
|
1057
1057
|
# -- inherited from EventEmitter --
|
1058
1058
|
# @nodoc
|
1059
|
-
def
|
1060
|
-
event_emitter_proxy.
|
1059
|
+
def on(event, callback)
|
1060
|
+
event_emitter_proxy.on(event, callback)
|
1061
1061
|
end
|
1062
1062
|
|
1063
1063
|
# -- inherited from EventEmitter --
|
1064
1064
|
# @nodoc
|
1065
|
-
def
|
1066
|
-
event_emitter_proxy.
|
1065
|
+
def off(event, callback)
|
1066
|
+
event_emitter_proxy.off(event, callback)
|
1067
1067
|
end
|
1068
1068
|
|
1069
1069
|
private def event_emitter_proxy
|
@@ -100,20 +100,20 @@ module Playwright
|
|
100
100
|
|
101
101
|
# -- inherited from EventEmitter --
|
102
102
|
# @nodoc
|
103
|
-
def
|
104
|
-
event_emitter_proxy.
|
103
|
+
def once(event, callback)
|
104
|
+
event_emitter_proxy.once(event, callback)
|
105
105
|
end
|
106
106
|
|
107
107
|
# -- inherited from EventEmitter --
|
108
108
|
# @nodoc
|
109
|
-
def
|
110
|
-
event_emitter_proxy.
|
109
|
+
def on(event, callback)
|
110
|
+
event_emitter_proxy.on(event, callback)
|
111
111
|
end
|
112
112
|
|
113
113
|
# -- inherited from EventEmitter --
|
114
114
|
# @nodoc
|
115
|
-
def
|
116
|
-
event_emitter_proxy.
|
115
|
+
def off(event, callback)
|
116
|
+
event_emitter_proxy.off(event, callback)
|
117
117
|
end
|
118
118
|
|
119
119
|
private def event_emitter_proxy
|
@@ -103,8 +103,8 @@ module Playwright
|
|
103
103
|
# - listitem:
|
104
104
|
# - link "About"
|
105
105
|
# ```
|
106
|
-
def aria_snapshot(
|
107
|
-
wrap_impl(@impl.aria_snapshot(
|
106
|
+
def aria_snapshot(timeout: nil)
|
107
|
+
wrap_impl(@impl.aria_snapshot(timeout: unwrap_impl(timeout)))
|
108
108
|
end
|
109
109
|
|
110
110
|
#
|
@@ -274,6 +274,20 @@ module Playwright
|
|
274
274
|
wrap_impl(@impl.dblclick(button: unwrap_impl(button), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
275
275
|
end
|
276
276
|
|
277
|
+
#
|
278
|
+
# Describes the locator, description is used in the trace viewer and reports.
|
279
|
+
# Returns the locator pointing to the same element.
|
280
|
+
#
|
281
|
+
# **Usage**
|
282
|
+
#
|
283
|
+
# ```python sync
|
284
|
+
# button = page.get_by_test_id("btn-sub").describe("Subscribe button")
|
285
|
+
# button.click()
|
286
|
+
# ```
|
287
|
+
def describe(description)
|
288
|
+
wrap_impl(@impl.describe(unwrap_impl(description)))
|
289
|
+
end
|
290
|
+
|
277
291
|
#
|
278
292
|
# Programmatically dispatch an event on the matching element.
|
279
293
|
#
|
@@ -393,6 +407,13 @@ module Playwright
|
|
393
407
|
# If `expression` throws or rejects, this method throws.
|
394
408
|
#
|
395
409
|
# **Usage**
|
410
|
+
#
|
411
|
+
# Passing argument to `expression`:
|
412
|
+
#
|
413
|
+
# ```python sync
|
414
|
+
# result = page.get_by_testid("myId").evaluate("(element, [x, y]) => element.textContent + ' ' + x * y", [7, 8])
|
415
|
+
# print(result) # prints "myId text 56"
|
416
|
+
# ```
|
396
417
|
def evaluate(expression, arg: nil, timeout: nil)
|
397
418
|
wrap_impl(@impl.evaluate(unwrap_impl(expression), arg: unwrap_impl(arg), timeout: unwrap_impl(timeout)))
|
398
419
|
end
|
@@ -1246,8 +1267,13 @@ module Playwright
|
|
1246
1267
|
end
|
1247
1268
|
|
1248
1269
|
# @nodoc
|
1249
|
-
def expect(expression, options)
|
1250
|
-
wrap_impl(@impl.expect(unwrap_impl(expression), unwrap_impl(options)))
|
1270
|
+
def expect(expression, options, title)
|
1271
|
+
wrap_impl(@impl.expect(unwrap_impl(expression), unwrap_impl(options), unwrap_impl(title)))
|
1272
|
+
end
|
1273
|
+
|
1274
|
+
# @nodoc
|
1275
|
+
def generate_locator_string
|
1276
|
+
wrap_impl(@impl.generate_locator_string)
|
1251
1277
|
end
|
1252
1278
|
|
1253
1279
|
# @nodoc
|
@@ -355,7 +355,7 @@ module Playwright
|
|
355
355
|
# When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class lists. Each element's class attribute is matched against the corresponding class in the array:
|
356
356
|
#
|
357
357
|
# ```html
|
358
|
-
# <div class='list'
|
358
|
+
# <div class='list'>
|
359
359
|
# <div class='component inactive'></div>
|
360
360
|
# <div class='component active'></div>
|
361
361
|
# <div class='component inactive'></div>
|
@@ -365,7 +365,7 @@ module Playwright
|
|
365
365
|
# ```python sync
|
366
366
|
# from playwright.sync_api import expect
|
367
367
|
#
|
368
|
-
# locator = page.locator("list > .component")
|
368
|
+
# locator = page.locator(".list > .component")
|
369
369
|
# await expect(locator).to_contain_class(["inactive", "active", "inactive"])
|
370
370
|
# ```
|
371
371
|
def to_contain_class(expected, timeout: nil)
|
@@ -504,7 +504,7 @@ module Playwright
|
|
504
504
|
# ```python sync
|
505
505
|
# from playwright.sync_api import expect
|
506
506
|
#
|
507
|
-
# locator = page.locator("list > .component")
|
507
|
+
# locator = page.locator(".list > .component")
|
508
508
|
# expect(locator).to_have_class(["component", "component selected", "component"])
|
509
509
|
# ```
|
510
510
|
def to_have_class(expected, timeout: nil)
|
data/lib/playwright_api/page.rb
CHANGED
@@ -1792,6 +1792,16 @@ module Playwright
|
|
1792
1792
|
raise NotImplementedError.new('wait_for_event is not implemented yet.')
|
1793
1793
|
end
|
1794
1794
|
|
1795
|
+
# @nodoc
|
1796
|
+
def guid
|
1797
|
+
wrap_impl(@impl.guid)
|
1798
|
+
end
|
1799
|
+
|
1800
|
+
# @nodoc
|
1801
|
+
def snapshot_for_ai
|
1802
|
+
wrap_impl(@impl.snapshot_for_ai)
|
1803
|
+
end
|
1804
|
+
|
1795
1805
|
# @nodoc
|
1796
1806
|
def start_js_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
|
1797
1807
|
wrap_impl(@impl.start_js_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
|
@@ -1817,9 +1827,10 @@ module Playwright
|
|
1817
1827
|
wrap_impl(@impl.owned_context=(unwrap_impl(req)))
|
1818
1828
|
end
|
1819
1829
|
|
1830
|
+
# -- inherited from EventEmitter --
|
1820
1831
|
# @nodoc
|
1821
|
-
def
|
1822
|
-
|
1832
|
+
def once(event, callback)
|
1833
|
+
event_emitter_proxy.once(event, callback)
|
1823
1834
|
end
|
1824
1835
|
|
1825
1836
|
# -- inherited from EventEmitter --
|
@@ -1834,12 +1845,6 @@ module Playwright
|
|
1834
1845
|
event_emitter_proxy.off(event, callback)
|
1835
1846
|
end
|
1836
1847
|
|
1837
|
-
# -- inherited from EventEmitter --
|
1838
|
-
# @nodoc
|
1839
|
-
def once(event, callback)
|
1840
|
-
event_emitter_proxy.once(event, callback)
|
1841
|
-
end
|
1842
|
-
|
1843
1848
|
private def event_emitter_proxy
|
1844
1849
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
1845
1850
|
end
|
@@ -105,20 +105,20 @@ module Playwright
|
|
105
105
|
|
106
106
|
# -- inherited from EventEmitter --
|
107
107
|
# @nodoc
|
108
|
-
def
|
109
|
-
event_emitter_proxy.
|
108
|
+
def once(event, callback)
|
109
|
+
event_emitter_proxy.once(event, callback)
|
110
110
|
end
|
111
111
|
|
112
112
|
# -- inherited from EventEmitter --
|
113
113
|
# @nodoc
|
114
|
-
def
|
115
|
-
event_emitter_proxy.
|
114
|
+
def on(event, callback)
|
115
|
+
event_emitter_proxy.on(event, callback)
|
116
116
|
end
|
117
117
|
|
118
118
|
# -- inherited from EventEmitter --
|
119
119
|
# @nodoc
|
120
|
-
def
|
121
|
-
event_emitter_proxy.
|
120
|
+
def off(event, callback)
|
121
|
+
event_emitter_proxy.off(event, callback)
|
122
122
|
end
|
123
123
|
|
124
124
|
private def event_emitter_proxy
|
@@ -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
|
@@ -129,20 +129,20 @@ module Playwright
|
|
129
129
|
|
130
130
|
# -- inherited from EventEmitter --
|
131
131
|
# @nodoc
|
132
|
-
def
|
133
|
-
event_emitter_proxy.
|
132
|
+
def once(event, callback)
|
133
|
+
event_emitter_proxy.once(event, callback)
|
134
134
|
end
|
135
135
|
|
136
136
|
# -- inherited from EventEmitter --
|
137
137
|
# @nodoc
|
138
|
-
def
|
139
|
-
event_emitter_proxy.
|
138
|
+
def on(event, callback)
|
139
|
+
event_emitter_proxy.on(event, callback)
|
140
140
|
end
|
141
141
|
|
142
142
|
# -- inherited from EventEmitter --
|
143
143
|
# @nodoc
|
144
|
-
def
|
145
|
-
event_emitter_proxy.
|
144
|
+
def off(event, callback)
|
145
|
+
event_emitter_proxy.off(event, callback)
|
146
146
|
end
|
147
147
|
|
148
148
|
private def event_emitter_proxy
|
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
|