playwright-ruby-client 1.18.1 → 1.19.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 +11 -1
- data/documentation/docs/api/frame.md +1 -1
- data/documentation/docs/api/frame_locator.md +1 -1
- data/documentation/docs/api/locator.md +10 -2
- data/documentation/docs/api/page.md +5 -1
- data/documentation/docs/api/route.md +1 -0
- data/documentation/docs/api/tracing.md +6 -1
- data/documentation/docs/include/api_coverage.md +1 -0
- data/lib/playwright/api_response_impl.rb +4 -0
- data/lib/playwright/channel_owner.rb +4 -0
- data/lib/playwright/channel_owners/api_request_context.rb +4 -0
- data/lib/playwright/channel_owners/browser_context.rb +10 -9
- data/lib/playwright/channel_owners/frame.rb +2 -2
- data/lib/playwright/channel_owners/page.rb +11 -5
- data/lib/playwright/channel_owners/route.rb +18 -4
- data/lib/playwright/{tracing_impl.rb → channel_owners/tracing.rb} +4 -8
- data/lib/playwright/frame_locator_impl.rb +2 -1
- data/lib/playwright/locator_impl.rb +42 -15
- data/lib/playwright/route_handler.rb +11 -8
- data/lib/playwright/transport.rb +14 -1
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright_api/android.rb +6 -6
- data/lib/playwright_api/android_device.rb +6 -6
- data/lib/playwright_api/api_request_context.rb +8 -8
- data/lib/playwright_api/browser.rb +6 -6
- data/lib/playwright_api/browser_context.rb +6 -6
- 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 +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 +8 -8
- data/lib/playwright_api/frame_locator.rb +2 -2
- data/lib/playwright_api/js_handle.rb +6 -6
- data/lib/playwright_api/locator.rb +8 -3
- data/lib/playwright_api/page.rb +14 -14
- data/lib/playwright_api/playwright.rb +6 -6
- data/lib/playwright_api/request.rb +6 -6
- data/lib/playwright_api/response.rb +6 -6
- data/lib/playwright_api/route.rb +8 -7
- data/lib/playwright_api/selectors.rb +6 -6
- data/lib/playwright_api/tracing.rb +29 -2
- data/lib/playwright_api/web_socket.rb +6 -6
- data/lib/playwright_api/worker.rb +8 -8
- metadata +5 -5
@@ -398,20 +398,20 @@ module Playwright
|
|
398
398
|
|
399
399
|
# -- inherited from EventEmitter --
|
400
400
|
# @nodoc
|
401
|
-
def
|
402
|
-
event_emitter_proxy.
|
401
|
+
def off(event, callback)
|
402
|
+
event_emitter_proxy.off(event, callback)
|
403
403
|
end
|
404
404
|
|
405
405
|
# -- inherited from EventEmitter --
|
406
406
|
# @nodoc
|
407
|
-
def
|
408
|
-
event_emitter_proxy.
|
407
|
+
def once(event, callback)
|
408
|
+
event_emitter_proxy.once(event, callback)
|
409
409
|
end
|
410
410
|
|
411
411
|
# -- inherited from EventEmitter --
|
412
412
|
# @nodoc
|
413
|
-
def
|
414
|
-
event_emitter_proxy.
|
413
|
+
def on(event, callback)
|
414
|
+
event_emitter_proxy.on(event, callback)
|
415
415
|
end
|
416
416
|
|
417
417
|
private def event_emitter_proxy
|
@@ -148,20 +148,20 @@ module Playwright
|
|
148
148
|
|
149
149
|
# -- inherited from EventEmitter --
|
150
150
|
# @nodoc
|
151
|
-
def
|
152
|
-
event_emitter_proxy.
|
151
|
+
def off(event, callback)
|
152
|
+
event_emitter_proxy.off(event, callback)
|
153
153
|
end
|
154
154
|
|
155
155
|
# -- inherited from EventEmitter --
|
156
156
|
# @nodoc
|
157
|
-
def
|
158
|
-
event_emitter_proxy.
|
157
|
+
def once(event, callback)
|
158
|
+
event_emitter_proxy.once(event, callback)
|
159
159
|
end
|
160
160
|
|
161
161
|
# -- inherited from EventEmitter --
|
162
162
|
# @nodoc
|
163
|
-
def
|
164
|
-
event_emitter_proxy.
|
163
|
+
def on(event, callback)
|
164
|
+
event_emitter_proxy.on(event, callback)
|
165
165
|
end
|
166
166
|
|
167
167
|
private def event_emitter_proxy
|
@@ -35,20 +35,20 @@ module Playwright
|
|
35
35
|
|
36
36
|
# -- inherited from EventEmitter --
|
37
37
|
# @nodoc
|
38
|
-
def
|
39
|
-
event_emitter_proxy.
|
38
|
+
def off(event, callback)
|
39
|
+
event_emitter_proxy.off(event, callback)
|
40
40
|
end
|
41
41
|
|
42
42
|
# -- inherited from EventEmitter --
|
43
43
|
# @nodoc
|
44
|
-
def
|
45
|
-
event_emitter_proxy.
|
44
|
+
def once(event, callback)
|
45
|
+
event_emitter_proxy.once(event, callback)
|
46
46
|
end
|
47
47
|
|
48
48
|
# -- inherited from EventEmitter --
|
49
49
|
# @nodoc
|
50
|
-
def
|
51
|
-
event_emitter_proxy.
|
50
|
+
def on(event, callback)
|
51
|
+
event_emitter_proxy.on(event, callback)
|
52
52
|
end
|
53
53
|
|
54
54
|
private def event_emitter_proxy
|
@@ -25,20 +25,20 @@ module Playwright
|
|
25
25
|
|
26
26
|
# -- inherited from EventEmitter --
|
27
27
|
# @nodoc
|
28
|
-
def
|
29
|
-
event_emitter_proxy.
|
28
|
+
def off(event, callback)
|
29
|
+
event_emitter_proxy.off(event, callback)
|
30
30
|
end
|
31
31
|
|
32
32
|
# -- inherited from EventEmitter --
|
33
33
|
# @nodoc
|
34
|
-
def
|
35
|
-
event_emitter_proxy.
|
34
|
+
def once(event, callback)
|
35
|
+
event_emitter_proxy.once(event, callback)
|
36
36
|
end
|
37
37
|
|
38
38
|
# -- inherited from EventEmitter --
|
39
39
|
# @nodoc
|
40
|
-
def
|
41
|
-
event_emitter_proxy.
|
40
|
+
def on(event, callback)
|
41
|
+
event_emitter_proxy.on(event, callback)
|
42
42
|
end
|
43
43
|
|
44
44
|
private def event_emitter_proxy
|
@@ -60,20 +60,20 @@ module Playwright
|
|
60
60
|
|
61
61
|
# -- inherited from EventEmitter --
|
62
62
|
# @nodoc
|
63
|
-
def
|
64
|
-
event_emitter_proxy.
|
63
|
+
def off(event, callback)
|
64
|
+
event_emitter_proxy.off(event, callback)
|
65
65
|
end
|
66
66
|
|
67
67
|
# -- inherited from EventEmitter --
|
68
68
|
# @nodoc
|
69
|
-
def
|
70
|
-
event_emitter_proxy.
|
69
|
+
def once(event, callback)
|
70
|
+
event_emitter_proxy.once(event, callback)
|
71
71
|
end
|
72
72
|
|
73
73
|
# -- inherited from EventEmitter --
|
74
74
|
# @nodoc
|
75
|
-
def
|
76
|
-
event_emitter_proxy.
|
75
|
+
def on(event, callback)
|
76
|
+
event_emitter_proxy.on(event, callback)
|
77
77
|
end
|
78
78
|
|
79
79
|
private def event_emitter_proxy
|
@@ -553,20 +553,20 @@ module Playwright
|
|
553
553
|
|
554
554
|
# -- inherited from EventEmitter --
|
555
555
|
# @nodoc
|
556
|
-
def
|
557
|
-
event_emitter_proxy.
|
556
|
+
def off(event, callback)
|
557
|
+
event_emitter_proxy.off(event, callback)
|
558
558
|
end
|
559
559
|
|
560
560
|
# -- inherited from EventEmitter --
|
561
561
|
# @nodoc
|
562
|
-
def
|
563
|
-
event_emitter_proxy.
|
562
|
+
def once(event, callback)
|
563
|
+
event_emitter_proxy.once(event, callback)
|
564
564
|
end
|
565
565
|
|
566
566
|
# -- inherited from EventEmitter --
|
567
567
|
# @nodoc
|
568
|
-
def
|
569
|
-
event_emitter_proxy.
|
568
|
+
def on(event, callback)
|
569
|
+
event_emitter_proxy.on(event, callback)
|
570
570
|
end
|
571
571
|
|
572
572
|
private def event_emitter_proxy
|
data/lib/playwright_api/frame.rb
CHANGED
@@ -445,8 +445,8 @@ module Playwright
|
|
445
445
|
# The method returns an element locator that can be used to perform actions in the frame. Locator is resolved to the
|
446
446
|
# element immediately before performing an action, so a series of actions on the same locator can in fact be performed on
|
447
447
|
# different DOM elements. That would happen if the DOM structure between those actions has changed.
|
448
|
-
def locator(selector, hasText: nil)
|
449
|
-
wrap_impl(@impl.locator(unwrap_impl(selector), hasText: unwrap_impl(hasText)))
|
448
|
+
def locator(selector, has: nil, hasText: nil)
|
449
|
+
wrap_impl(@impl.locator(unwrap_impl(selector), has: unwrap_impl(has), hasText: unwrap_impl(hasText)))
|
450
450
|
end
|
451
451
|
|
452
452
|
# Returns frame's name attribute as specified in the tag.
|
@@ -790,20 +790,20 @@ module Playwright
|
|
790
790
|
|
791
791
|
# -- inherited from EventEmitter --
|
792
792
|
# @nodoc
|
793
|
-
def
|
794
|
-
event_emitter_proxy.
|
793
|
+
def off(event, callback)
|
794
|
+
event_emitter_proxy.off(event, callback)
|
795
795
|
end
|
796
796
|
|
797
797
|
# -- inherited from EventEmitter --
|
798
798
|
# @nodoc
|
799
|
-
def
|
800
|
-
event_emitter_proxy.
|
799
|
+
def once(event, callback)
|
800
|
+
event_emitter_proxy.once(event, callback)
|
801
801
|
end
|
802
802
|
|
803
803
|
# -- inherited from EventEmitter --
|
804
804
|
# @nodoc
|
805
|
-
def
|
806
|
-
event_emitter_proxy.
|
805
|
+
def on(event, callback)
|
806
|
+
event_emitter_proxy.on(event, callback)
|
807
807
|
end
|
808
808
|
|
809
809
|
private def event_emitter_proxy
|
@@ -48,8 +48,8 @@ module Playwright
|
|
48
48
|
end
|
49
49
|
|
50
50
|
# The method finds an element matching the specified selector in the FrameLocator's subtree.
|
51
|
-
def locator(selector, hasText: nil)
|
52
|
-
wrap_impl(@impl.locator(unwrap_impl(selector), hasText: unwrap_impl(hasText)))
|
51
|
+
def locator(selector, has: nil, hasText: nil)
|
52
|
+
wrap_impl(@impl.locator(unwrap_impl(selector), has: unwrap_impl(has), hasText: unwrap_impl(hasText)))
|
53
53
|
end
|
54
54
|
|
55
55
|
# Returns locator to the n-th matching frame.
|
@@ -90,20 +90,20 @@ module Playwright
|
|
90
90
|
|
91
91
|
# -- inherited from EventEmitter --
|
92
92
|
# @nodoc
|
93
|
-
def
|
94
|
-
event_emitter_proxy.
|
93
|
+
def off(event, callback)
|
94
|
+
event_emitter_proxy.off(event, callback)
|
95
95
|
end
|
96
96
|
|
97
97
|
# -- inherited from EventEmitter --
|
98
98
|
# @nodoc
|
99
|
-
def
|
100
|
-
event_emitter_proxy.
|
99
|
+
def once(event, callback)
|
100
|
+
event_emitter_proxy.once(event, callback)
|
101
101
|
end
|
102
102
|
|
103
103
|
# -- inherited from EventEmitter --
|
104
104
|
# @nodoc
|
105
|
-
def
|
106
|
-
event_emitter_proxy.
|
105
|
+
def on(event, callback)
|
106
|
+
event_emitter_proxy.on(event, callback)
|
107
107
|
end
|
108
108
|
|
109
109
|
private def event_emitter_proxy
|
@@ -238,7 +238,7 @@ module Playwright
|
|
238
238
|
# that iframe:
|
239
239
|
#
|
240
240
|
# ```python sync
|
241
|
-
# locator = page.frame_locator("
|
241
|
+
# locator = page.frame_locator("iframe").locator("text=Submit")
|
242
242
|
# locator.click()
|
243
243
|
# ```
|
244
244
|
def frame_locator(selector)
|
@@ -320,8 +320,8 @@ module Playwright
|
|
320
320
|
end
|
321
321
|
|
322
322
|
# The method finds an element matching the specified selector in the `Locator`'s subtree.
|
323
|
-
def locator(selector, hasText: nil)
|
324
|
-
wrap_impl(@impl.locator(unwrap_impl(selector), hasText: unwrap_impl(hasText)))
|
323
|
+
def locator(selector, has: nil, hasText: nil)
|
324
|
+
wrap_impl(@impl.locator(unwrap_impl(selector), has: unwrap_impl(has), hasText: unwrap_impl(hasText)))
|
325
325
|
end
|
326
326
|
|
327
327
|
# Returns locator to the n-th matching element.
|
@@ -329,6 +329,11 @@ module Playwright
|
|
329
329
|
wrap_impl(@impl.nth(unwrap_impl(index)))
|
330
330
|
end
|
331
331
|
|
332
|
+
# A page this locator belongs to.
|
333
|
+
def page
|
334
|
+
wrap_impl(@impl.page)
|
335
|
+
end
|
336
|
+
|
332
337
|
# Focuses the element, and then uses [`method: Keyboard.down`] and [`method: Keyboard.up`].
|
333
338
|
#
|
334
339
|
# `key` can specify the intended [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key)
|
data/lib/playwright_api/page.rb
CHANGED
@@ -686,8 +686,8 @@ module Playwright
|
|
686
686
|
# different DOM elements. That would happen if the DOM structure between those actions has changed.
|
687
687
|
#
|
688
688
|
# Shortcut for main frame's [`method: Frame.locator`].
|
689
|
-
def locator(selector, hasText: nil)
|
690
|
-
wrap_impl(@impl.locator(unwrap_impl(selector), hasText: unwrap_impl(hasText)))
|
689
|
+
def locator(selector, has: nil, hasText: nil)
|
690
|
+
wrap_impl(@impl.locator(unwrap_impl(selector), has: unwrap_impl(has), hasText: unwrap_impl(hasText)))
|
691
691
|
end
|
692
692
|
|
693
693
|
# The page's main frame. Page is guaranteed to have a main frame which persists during navigations.
|
@@ -1282,7 +1282,7 @@ module Playwright
|
|
1282
1282
|
# return response.ok
|
1283
1283
|
#
|
1284
1284
|
# # or with a lambda
|
1285
|
-
# with page.expect_response(lambda response: response.url == "https://example.com" and response.status
|
1285
|
+
# with page.expect_response(lambda response: response.url == "https://example.com" and response.status == 200) as response_info:
|
1286
1286
|
# page.click("input")
|
1287
1287
|
# response = response_info.value
|
1288
1288
|
# return response.ok
|
@@ -1386,11 +1386,6 @@ module Playwright
|
|
1386
1386
|
wrap_impl(@impl.owned_context=(unwrap_impl(req)))
|
1387
1387
|
end
|
1388
1388
|
|
1389
|
-
# @nodoc
|
1390
|
-
def start_js_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
|
1391
|
-
wrap_impl(@impl.start_js_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
|
1392
|
-
end
|
1393
|
-
|
1394
1389
|
# @nodoc
|
1395
1390
|
def start_css_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
|
1396
1391
|
wrap_impl(@impl.start_css_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
|
@@ -1406,6 +1401,11 @@ module Playwright
|
|
1406
1401
|
wrap_impl(@impl.stop_js_coverage)
|
1407
1402
|
end
|
1408
1403
|
|
1404
|
+
# @nodoc
|
1405
|
+
def start_js_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
|
1406
|
+
wrap_impl(@impl.start_js_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
|
1407
|
+
end
|
1408
|
+
|
1409
1409
|
# @nodoc
|
1410
1410
|
def guid
|
1411
1411
|
wrap_impl(@impl.guid)
|
@@ -1413,20 +1413,20 @@ module Playwright
|
|
1413
1413
|
|
1414
1414
|
# -- inherited from EventEmitter --
|
1415
1415
|
# @nodoc
|
1416
|
-
def
|
1417
|
-
event_emitter_proxy.
|
1416
|
+
def off(event, callback)
|
1417
|
+
event_emitter_proxy.off(event, callback)
|
1418
1418
|
end
|
1419
1419
|
|
1420
1420
|
# -- inherited from EventEmitter --
|
1421
1421
|
# @nodoc
|
1422
|
-
def
|
1423
|
-
event_emitter_proxy.
|
1422
|
+
def once(event, callback)
|
1423
|
+
event_emitter_proxy.once(event, callback)
|
1424
1424
|
end
|
1425
1425
|
|
1426
1426
|
# -- inherited from EventEmitter --
|
1427
1427
|
# @nodoc
|
1428
|
-
def
|
1429
|
-
event_emitter_proxy.
|
1428
|
+
def on(event, callback)
|
1429
|
+
event_emitter_proxy.on(event, callback)
|
1430
1430
|
end
|
1431
1431
|
|
1432
1432
|
private def event_emitter_proxy
|
@@ -98,20 +98,20 @@ module Playwright
|
|
98
98
|
|
99
99
|
# -- inherited from EventEmitter --
|
100
100
|
# @nodoc
|
101
|
-
def
|
102
|
-
event_emitter_proxy.
|
101
|
+
def off(event, callback)
|
102
|
+
event_emitter_proxy.off(event, callback)
|
103
103
|
end
|
104
104
|
|
105
105
|
# -- inherited from EventEmitter --
|
106
106
|
# @nodoc
|
107
|
-
def
|
108
|
-
event_emitter_proxy.
|
107
|
+
def once(event, callback)
|
108
|
+
event_emitter_proxy.once(event, callback)
|
109
109
|
end
|
110
110
|
|
111
111
|
# -- inherited from EventEmitter --
|
112
112
|
# @nodoc
|
113
|
-
def
|
114
|
-
event_emitter_proxy.
|
113
|
+
def on(event, callback)
|
114
|
+
event_emitter_proxy.on(event, callback)
|
115
115
|
end
|
116
116
|
|
117
117
|
private def event_emitter_proxy
|
@@ -156,20 +156,20 @@ module Playwright
|
|
156
156
|
|
157
157
|
# -- inherited from EventEmitter --
|
158
158
|
# @nodoc
|
159
|
-
def
|
160
|
-
event_emitter_proxy.
|
159
|
+
def off(event, callback)
|
160
|
+
event_emitter_proxy.off(event, callback)
|
161
161
|
end
|
162
162
|
|
163
163
|
# -- inherited from EventEmitter --
|
164
164
|
# @nodoc
|
165
|
-
def
|
166
|
-
event_emitter_proxy.
|
165
|
+
def once(event, callback)
|
166
|
+
event_emitter_proxy.once(event, callback)
|
167
167
|
end
|
168
168
|
|
169
169
|
# -- inherited from EventEmitter --
|
170
170
|
# @nodoc
|
171
|
-
def
|
172
|
-
event_emitter_proxy.
|
171
|
+
def on(event, callback)
|
172
|
+
event_emitter_proxy.on(event, callback)
|
173
173
|
end
|
174
174
|
|
175
175
|
private def event_emitter_proxy
|
@@ -99,20 +99,20 @@ module Playwright
|
|
99
99
|
|
100
100
|
# -- inherited from EventEmitter --
|
101
101
|
# @nodoc
|
102
|
-
def
|
103
|
-
event_emitter_proxy.
|
102
|
+
def off(event, callback)
|
103
|
+
event_emitter_proxy.off(event, callback)
|
104
104
|
end
|
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
|
private def event_emitter_proxy
|
data/lib/playwright_api/route.rb
CHANGED
@@ -47,8 +47,9 @@ module Playwright
|
|
47
47
|
contentType: nil,
|
48
48
|
headers: nil,
|
49
49
|
path: nil,
|
50
|
+
response: nil,
|
50
51
|
status: nil)
|
51
|
-
wrap_impl(@impl.fulfill(body: unwrap_impl(body), contentType: unwrap_impl(contentType), headers: unwrap_impl(headers), path: unwrap_impl(path), status: unwrap_impl(status)))
|
52
|
+
wrap_impl(@impl.fulfill(body: unwrap_impl(body), contentType: unwrap_impl(contentType), headers: unwrap_impl(headers), path: unwrap_impl(path), response: unwrap_impl(response), status: unwrap_impl(status)))
|
52
53
|
end
|
53
54
|
|
54
55
|
# A request to be routed.
|
@@ -58,20 +59,20 @@ module Playwright
|
|
58
59
|
|
59
60
|
# -- inherited from EventEmitter --
|
60
61
|
# @nodoc
|
61
|
-
def
|
62
|
-
event_emitter_proxy.
|
62
|
+
def off(event, callback)
|
63
|
+
event_emitter_proxy.off(event, callback)
|
63
64
|
end
|
64
65
|
|
65
66
|
# -- inherited from EventEmitter --
|
66
67
|
# @nodoc
|
67
|
-
def
|
68
|
-
event_emitter_proxy.
|
68
|
+
def once(event, callback)
|
69
|
+
event_emitter_proxy.once(event, callback)
|
69
70
|
end
|
70
71
|
|
71
72
|
# -- inherited from EventEmitter --
|
72
73
|
# @nodoc
|
73
|
-
def
|
74
|
-
event_emitter_proxy.
|
74
|
+
def on(event, callback)
|
75
|
+
event_emitter_proxy.on(event, callback)
|
75
76
|
end
|
76
77
|
|
77
78
|
private def event_emitter_proxy
|
@@ -45,20 +45,20 @@ module Playwright
|
|
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
|
# -- inherited from EventEmitter --
|
53
53
|
# @nodoc
|
54
|
-
def
|
55
|
-
event_emitter_proxy.
|
54
|
+
def once(event, callback)
|
55
|
+
event_emitter_proxy.once(event, callback)
|
56
56
|
end
|
57
57
|
|
58
58
|
# -- inherited from EventEmitter --
|
59
59
|
# @nodoc
|
60
|
-
def
|
61
|
-
event_emitter_proxy.
|
60
|
+
def on(event, callback)
|
61
|
+
event_emitter_proxy.on(event, callback)
|
62
62
|
end
|
63
63
|
|
64
64
|
private def event_emitter_proxy
|
@@ -22,8 +22,13 @@ module Playwright
|
|
22
22
|
# page.goto("https://playwright.dev")
|
23
23
|
# context.tracing.stop(path = "trace.zip")
|
24
24
|
# ```
|
25
|
-
def start(
|
26
|
-
|
25
|
+
def start(
|
26
|
+
name: nil,
|
27
|
+
screenshots: nil,
|
28
|
+
snapshots: nil,
|
29
|
+
sources: nil,
|
30
|
+
title: nil)
|
31
|
+
wrap_impl(@impl.start(name: unwrap_impl(name), screenshots: unwrap_impl(screenshots), snapshots: unwrap_impl(snapshots), sources: unwrap_impl(sources), title: unwrap_impl(title)))
|
27
32
|
end
|
28
33
|
|
29
34
|
# Start a new trace chunk. If you'd like to record multiple traces on the same `BrowserContext`, use
|
@@ -58,5 +63,27 @@ module Playwright
|
|
58
63
|
def stop_chunk(path: nil)
|
59
64
|
wrap_impl(@impl.stop_chunk(path: unwrap_impl(path)))
|
60
65
|
end
|
66
|
+
|
67
|
+
# -- inherited from EventEmitter --
|
68
|
+
# @nodoc
|
69
|
+
def off(event, callback)
|
70
|
+
event_emitter_proxy.off(event, callback)
|
71
|
+
end
|
72
|
+
|
73
|
+
# -- inherited from EventEmitter --
|
74
|
+
# @nodoc
|
75
|
+
def once(event, callback)
|
76
|
+
event_emitter_proxy.once(event, callback)
|
77
|
+
end
|
78
|
+
|
79
|
+
# -- inherited from EventEmitter --
|
80
|
+
# @nodoc
|
81
|
+
def on(event, callback)
|
82
|
+
event_emitter_proxy.on(event, callback)
|
83
|
+
end
|
84
|
+
|
85
|
+
private def event_emitter_proxy
|
86
|
+
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
87
|
+
end
|
61
88
|
end
|
62
89
|
end
|
@@ -29,20 +29,20 @@ module Playwright
|
|
29
29
|
|
30
30
|
# -- inherited from EventEmitter --
|
31
31
|
# @nodoc
|
32
|
-
def
|
33
|
-
event_emitter_proxy.
|
32
|
+
def off(event, callback)
|
33
|
+
event_emitter_proxy.off(event, callback)
|
34
34
|
end
|
35
35
|
|
36
36
|
# -- inherited from EventEmitter --
|
37
37
|
# @nodoc
|
38
|
-
def
|
39
|
-
event_emitter_proxy.
|
38
|
+
def once(event, callback)
|
39
|
+
event_emitter_proxy.once(event, callback)
|
40
40
|
end
|
41
41
|
|
42
42
|
# -- inherited from EventEmitter --
|
43
43
|
# @nodoc
|
44
|
-
def
|
45
|
-
event_emitter_proxy.
|
44
|
+
def on(event, callback)
|
45
|
+
event_emitter_proxy.on(event, callback)
|
46
46
|
end
|
47
47
|
|
48
48
|
private def event_emitter_proxy
|
@@ -43,14 +43,20 @@ module Playwright
|
|
43
43
|
wrap_impl(@impl.url)
|
44
44
|
end
|
45
45
|
|
46
|
+
# @nodoc
|
47
|
+
def page=(req)
|
48
|
+
wrap_impl(@impl.page=(unwrap_impl(req)))
|
49
|
+
end
|
50
|
+
|
46
51
|
# @nodoc
|
47
52
|
def context=(req)
|
48
53
|
wrap_impl(@impl.context=(unwrap_impl(req)))
|
49
54
|
end
|
50
55
|
|
56
|
+
# -- inherited from EventEmitter --
|
51
57
|
# @nodoc
|
52
|
-
def
|
53
|
-
|
58
|
+
def off(event, callback)
|
59
|
+
event_emitter_proxy.off(event, callback)
|
54
60
|
end
|
55
61
|
|
56
62
|
# -- inherited from EventEmitter --
|
@@ -65,12 +71,6 @@ module Playwright
|
|
65
71
|
event_emitter_proxy.on(event, callback)
|
66
72
|
end
|
67
73
|
|
68
|
-
# -- inherited from EventEmitter --
|
69
|
-
# @nodoc
|
70
|
-
def off(event, callback)
|
71
|
-
event_emitter_proxy.off(event, callback)
|
72
|
-
end
|
73
|
-
|
74
74
|
private def event_emitter_proxy
|
75
75
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
76
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -304,6 +304,7 @@ files:
|
|
304
304
|
- lib/playwright/channel_owners/route.rb
|
305
305
|
- lib/playwright/channel_owners/selectors.rb
|
306
306
|
- lib/playwright/channel_owners/stream.rb
|
307
|
+
- lib/playwright/channel_owners/tracing.rb
|
307
308
|
- lib/playwright/channel_owners/web_socket.rb
|
308
309
|
- lib/playwright/channel_owners/worker.rb
|
309
310
|
- lib/playwright/connection.rb
|
@@ -329,7 +330,6 @@ files:
|
|
329
330
|
- lib/playwright/select_option_values.rb
|
330
331
|
- lib/playwright/timeout_settings.rb
|
331
332
|
- lib/playwright/touchscreen_impl.rb
|
332
|
-
- lib/playwright/tracing_impl.rb
|
333
333
|
- lib/playwright/transport.rb
|
334
334
|
- lib/playwright/url_matcher.rb
|
335
335
|
- lib/playwright/utils.rb
|
@@ -393,8 +393,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
393
393
|
- !ruby/object:Gem::Version
|
394
394
|
version: '0'
|
395
395
|
requirements: []
|
396
|
-
rubygems_version: 3.3.
|
396
|
+
rubygems_version: 3.3.7
|
397
397
|
signing_key:
|
398
398
|
specification_version: 4
|
399
|
-
summary: The Ruby binding of playwright driver 1.
|
399
|
+
summary: The Ruby binding of playwright driver 1.19.2
|
400
400
|
test_files: []
|