playwright-ruby-client 1.62.0 → 1.63.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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/documentation/docs/api/api_request_context.md +3 -0
  3. data/documentation/docs/api/browser_context.md +3 -3
  4. data/documentation/docs/api/frame.md +12 -1
  5. data/documentation/docs/api/frame_locator.md +20 -0
  6. data/documentation/docs/api/locator.md +28 -0
  7. data/documentation/docs/api/page.md +12 -1
  8. data/documentation/docs/api/tracing.md +3 -1
  9. data/documentation/docs/article/guides/playwright_on_alpine_linux.md +1 -1
  10. data/documentation/docs/include/api_coverage.md +1 -0
  11. data/lib/playwright/api_request_impl.rb +3 -1
  12. data/lib/playwright/channel.rb +2 -1
  13. data/lib/playwright/channel_owners/browser.rb +1 -0
  14. data/lib/playwright/channel_owners/browser_context.rb +17 -2
  15. data/lib/playwright/channel_owners/frame.rb +2 -2
  16. data/lib/playwright/channel_owners/page.rb +2 -1
  17. data/lib/playwright/channel_owners/tracing.rb +43 -13
  18. data/lib/playwright/events.rb +2 -0
  19. data/lib/playwright/frame_locator_impl.rb +20 -5
  20. data/lib/playwright/locator_impl.rb +4 -0
  21. data/lib/playwright/utils.rb +12 -0
  22. data/lib/playwright/version.rb +2 -2
  23. data/lib/playwright_api/api_request_context.rb +9 -7
  24. data/lib/playwright_api/browser.rb +6 -6
  25. data/lib/playwright_api/browser_context.rb +17 -17
  26. data/lib/playwright_api/browser_type.rb +6 -6
  27. data/lib/playwright_api/cdp_session.rb +6 -6
  28. data/lib/playwright_api/dialog.rb +6 -6
  29. data/lib/playwright_api/element_handle.rb +6 -6
  30. data/lib/playwright_api/frame.rb +25 -14
  31. data/lib/playwright_api/frame_locator.rb +20 -0
  32. data/lib/playwright_api/js_handle.rb +6 -6
  33. data/lib/playwright_api/locator.rb +25 -0
  34. data/lib/playwright_api/page.rb +28 -17
  35. data/lib/playwright_api/playwright.rb +6 -6
  36. data/lib/playwright_api/request.rb +8 -8
  37. data/lib/playwright_api/response.rb +6 -6
  38. data/lib/playwright_api/route.rb +6 -6
  39. data/lib/playwright_api/tracing.rb +10 -8
  40. data/lib/playwright_api/web_socket.rb +6 -6
  41. data/lib/playwright_api/worker.rb +8 -8
  42. data/sig/playwright.rbs +9 -8
  43. metadata +2 -2
@@ -423,13 +423,13 @@ module Playwright
423
423
  alias_method :offline=, :set_offline
424
424
 
425
425
  #
426
- # Returns storage state for this browser context, contains current cookies, local storage snapshot, IndexedDB snapshot and virtual WebAuthn credentials.
427
- def storage_state(credentials: nil, indexedDB: nil, path: nil)
428
- wrap_impl(@impl.storage_state(credentials: unwrap_impl(credentials), indexedDB: unwrap_impl(indexedDB), path: unwrap_impl(path)))
426
+ # Returns storage state for this browser context, contains current cookies, local storage snapshot, IndexedDB snapshot, origin private file system snapshot and virtual WebAuthn credentials.
427
+ def storage_state(credentials: nil, indexedDB: nil, opfs: nil, path: nil)
428
+ wrap_impl(@impl.storage_state(credentials: unwrap_impl(credentials), indexedDB: unwrap_impl(indexedDB), opfs: unwrap_impl(opfs), path: unwrap_impl(path)))
429
429
  end
430
430
 
431
431
  #
432
- # Clears the existing cookies, local storage, IndexedDB entries and virtual WebAuthn credentials, and sets the new storage
432
+ # Clears the existing cookies, local storage, IndexedDB entries, origin private file system entries and virtual WebAuthn credentials, and sets the new storage
433
433
  # state. When the storage state contains credentials, the virtual WebAuthn authenticator is installed (equivalent to
434
434
  # [`method: Credentials.install`]), preventing all real authenticators from working in this context.
435
435
  #
@@ -498,11 +498,21 @@ module Playwright
498
498
  raise NotImplementedError.new('wait_for_event is not implemented yet.')
499
499
  end
500
500
 
501
+ # @nodoc
502
+ def owner_page=(req)
503
+ wrap_impl(@impl.owner_page=(unwrap_impl(req)))
504
+ end
505
+
501
506
  # @nodoc
502
507
  def browser=(req)
503
508
  wrap_impl(@impl.browser=(unwrap_impl(req)))
504
509
  end
505
510
 
511
+ # @nodoc
512
+ def options=(req)
513
+ wrap_impl(@impl.options=(unwrap_impl(req)))
514
+ end
515
+
506
516
  # @nodoc
507
517
  def enable_debug_console!
508
518
  wrap_impl(@impl.enable_debug_console!)
@@ -513,14 +523,10 @@ module Playwright
513
523
  wrap_impl(@impl.pause)
514
524
  end
515
525
 
526
+ # -- inherited from EventEmitter --
516
527
  # @nodoc
517
- def options=(req)
518
- wrap_impl(@impl.options=(unwrap_impl(req)))
519
- end
520
-
521
- # @nodoc
522
- def owner_page=(req)
523
- wrap_impl(@impl.owner_page=(unwrap_impl(req)))
528
+ def off(event, callback)
529
+ event_emitter_proxy.off(event, callback)
524
530
  end
525
531
 
526
532
  # -- inherited from EventEmitter --
@@ -535,12 +541,6 @@ module Playwright
535
541
  event_emitter_proxy.on(event, callback)
536
542
  end
537
543
 
538
- # -- inherited from EventEmitter --
539
- # @nodoc
540
- def off(event, callback)
541
- event_emitter_proxy.off(event, callback)
542
- end
543
-
544
544
  private def event_emitter_proxy
545
545
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
546
546
  end
@@ -188,20 +188,20 @@ module Playwright
188
188
 
189
189
  # -- inherited from EventEmitter --
190
190
  # @nodoc
191
- def once(event, callback)
192
- event_emitter_proxy.once(event, callback)
191
+ def off(event, callback)
192
+ event_emitter_proxy.off(event, callback)
193
193
  end
194
194
 
195
195
  # -- inherited from EventEmitter --
196
196
  # @nodoc
197
- def on(event, callback)
198
- event_emitter_proxy.on(event, callback)
197
+ def once(event, callback)
198
+ event_emitter_proxy.once(event, callback)
199
199
  end
200
200
 
201
201
  # -- inherited from EventEmitter --
202
202
  # @nodoc
203
- def off(event, callback)
204
- event_emitter_proxy.off(event, callback)
203
+ def on(event, callback)
204
+ event_emitter_proxy.on(event, callback)
205
205
  end
206
206
 
207
207
  private def event_emitter_proxy
@@ -33,20 +33,20 @@ module Playwright
33
33
 
34
34
  # -- inherited from EventEmitter --
35
35
  # @nodoc
36
- def once(event, callback)
37
- event_emitter_proxy.once(event, callback)
36
+ def off(event, callback)
37
+ event_emitter_proxy.off(event, callback)
38
38
  end
39
39
 
40
40
  # -- inherited from EventEmitter --
41
41
  # @nodoc
42
- def on(event, callback)
43
- event_emitter_proxy.on(event, callback)
42
+ def once(event, callback)
43
+ event_emitter_proxy.once(event, callback)
44
44
  end
45
45
 
46
46
  # -- inherited from EventEmitter --
47
47
  # @nodoc
48
- def off(event, callback)
49
- event_emitter_proxy.off(event, callback)
48
+ def on(event, callback)
49
+ event_emitter_proxy.on(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 once(event, callback)
74
- event_emitter_proxy.once(event, callback)
73
+ def off(event, callback)
74
+ event_emitter_proxy.off(event, callback)
75
75
  end
76
76
 
77
77
  # -- inherited from EventEmitter --
78
78
  # @nodoc
79
- def on(event, callback)
80
- event_emitter_proxy.on(event, callback)
79
+ def once(event, callback)
80
+ event_emitter_proxy.once(event, callback)
81
81
  end
82
82
 
83
83
  # -- inherited from EventEmitter --
84
84
  # @nodoc
85
- def off(event, callback)
86
- event_emitter_proxy.off(event, callback)
85
+ def on(event, callback)
86
+ event_emitter_proxy.on(event, callback)
87
87
  end
88
88
 
89
89
  private def event_emitter_proxy
@@ -583,20 +583,20 @@ module Playwright
583
583
 
584
584
  # -- inherited from EventEmitter --
585
585
  # @nodoc
586
- def once(event, callback)
587
- event_emitter_proxy.once(event, callback)
586
+ def off(event, callback)
587
+ event_emitter_proxy.off(event, callback)
588
588
  end
589
589
 
590
590
  # -- inherited from EventEmitter --
591
591
  # @nodoc
592
- def on(event, callback)
593
- event_emitter_proxy.on(event, callback)
592
+ def once(event, callback)
593
+ event_emitter_proxy.once(event, callback)
594
594
  end
595
595
 
596
596
  # -- inherited from EventEmitter --
597
597
  # @nodoc
598
- def off(event, callback)
599
- event_emitter_proxy.off(event, callback)
598
+ def on(event, callback)
599
+ event_emitter_proxy.on(event, callback)
600
600
  end
601
601
 
602
602
  private def event_emitter_proxy
@@ -347,6 +347,10 @@ module Playwright
347
347
  # When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
348
348
  # in that iframe.
349
349
  #
350
+ # When called without `selector`, the search starts in this frame or in any of the iframes inside it,
351
+ # so that you don't need to locate each iframe first. Note that the rest of the locator is resolved inside a single
352
+ # frame, just like any other locator. If it matches elements inside multiple frames, an error is thrown.
353
+ #
350
354
  # **Usage**
351
355
  #
352
356
  # Following snippet locates element with text "Submit" in the iframe with id `my-frame`, like `<iframe id="my-frame">`:
@@ -355,7 +359,14 @@ module Playwright
355
359
  # locator = frame.frame_locator("#my-iframe").get_by_text("Submit")
356
360
  # locator.click()
357
361
  # ```
358
- def frame_locator(selector)
362
+ #
363
+ # Following snippet locates a button, either in the frame or in one of the iframes inside it:
364
+ #
365
+ # ```python sync
366
+ # locator = frame.frame_locator().get_by_role("button")
367
+ # locator.click()
368
+ # ```
369
+ def frame_locator(selector = nil)
359
370
  wrap_impl(@impl.frame_locator(unwrap_impl(selector)))
360
371
  end
361
372
 
@@ -1054,6 +1065,16 @@ module Playwright
1054
1065
  wrap_impl(@impl.drop(unwrap_impl(selector), unwrap_impl(payload), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
1055
1066
  end
1056
1067
 
1068
+ # @nodoc
1069
+ def detached=(req)
1070
+ wrap_impl(@impl.detached=(unwrap_impl(req)))
1071
+ end
1072
+
1073
+ # @nodoc
1074
+ def highlight(selector, style: nil)
1075
+ wrap_impl(@impl.highlight(unwrap_impl(selector), style: unwrap_impl(style)))
1076
+ end
1077
+
1057
1078
  # @nodoc
1058
1079
  def hide_highlight(selector)
1059
1080
  wrap_impl(@impl.hide_highlight(unwrap_impl(selector)))
@@ -1064,14 +1085,10 @@ module Playwright
1064
1085
  wrap_impl(@impl.expect(unwrap_impl(selector), unwrap_impl(expression), unwrap_impl(options), unwrap_impl(title)))
1065
1086
  end
1066
1087
 
1088
+ # -- inherited from EventEmitter --
1067
1089
  # @nodoc
1068
- def detached=(req)
1069
- wrap_impl(@impl.detached=(unwrap_impl(req)))
1070
- end
1071
-
1072
- # @nodoc
1073
- def highlight(selector, style: nil)
1074
- wrap_impl(@impl.highlight(unwrap_impl(selector), style: unwrap_impl(style)))
1090
+ def off(event, callback)
1091
+ event_emitter_proxy.off(event, callback)
1075
1092
  end
1076
1093
 
1077
1094
  # -- inherited from EventEmitter --
@@ -1086,12 +1103,6 @@ module Playwright
1086
1103
  event_emitter_proxy.on(event, callback)
1087
1104
  end
1088
1105
 
1089
- # -- inherited from EventEmitter --
1090
- # @nodoc
1091
- def off(event, callback)
1092
- event_emitter_proxy.off(event, callback)
1093
- end
1094
-
1095
1106
  private def event_emitter_proxy
1096
1107
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
1097
1108
  end
@@ -19,6 +19,26 @@ module Playwright
19
19
  # page.locator('.result-frame').first.content_frame.get_by_role('button').click()
20
20
  # ```
21
21
  #
22
+ # **Any frame**
23
+ #
24
+ # Calling [`method: Page.frameLocator`] or [`method: Frame.frameLocator`] without a selector creates a frame locator that
25
+ # starts the search in any frame of the subtree - so that you don't
26
+ # need to locate the iframe first.
27
+ #
28
+ # ```python sync
29
+ # # Finds the button in any frame on the page:
30
+ # page.frame_locator().get_by_role("button").click()
31
+ #
32
+ # # Finds the iframe with id "my-frame" anywhere on the page, and clicks the button inside it:
33
+ # page.frame_locator().locator("#my-frame").content_frame.get_by_role("button").click()
34
+ # ```
35
+ #
36
+ # Only the start of the search is affected - the rest of the locator is resolved inside a single frame, just like any
37
+ # other locator. Following the strictness rules above, an error is thrown when elements are matched in multiple frames.
38
+ #
39
+ # Such a frame locator does not point to a particular `iframe`, so [`method: FrameLocator.owner`],
40
+ # [`method: FrameLocator.first`], [`method: FrameLocator.last`] and [`method: FrameLocator.nth`] are not supported on it.
41
+ #
22
42
  # **Converting Locator to FrameLocator**
23
43
  #
24
44
  # If you have a `Locator` object pointing to an `iframe` it can be converted to `FrameLocator` using [`method: Locator.contentFrame`].
@@ -100,20 +100,20 @@ module Playwright
100
100
 
101
101
  # -- inherited from EventEmitter --
102
102
  # @nodoc
103
- def once(event, callback)
104
- event_emitter_proxy.once(event, callback)
103
+ def off(event, callback)
104
+ event_emitter_proxy.off(event, callback)
105
105
  end
106
106
 
107
107
  # -- inherited from EventEmitter --
108
108
  # @nodoc
109
- def on(event, callback)
110
- event_emitter_proxy.on(event, callback)
109
+ def once(event, callback)
110
+ event_emitter_proxy.once(event, callback)
111
111
  end
112
112
 
113
113
  # -- inherited from EventEmitter --
114
114
  # @nodoc
115
- def off(event, callback)
116
- event_emitter_proxy.off(event, callback)
115
+ def on(event, callback)
116
+ event_emitter_proxy.on(event, callback)
117
117
  end
118
118
 
119
119
  private def event_emitter_proxy
@@ -1317,6 +1317,31 @@ module Playwright
1317
1317
  wrap_impl(@impl.uncheck(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
1318
1318
  end
1319
1319
 
1320
+ #
1321
+ # Returns a locator that matches only [visible](../actionability.md#visible) elements, ignoring the invisible ones. This is the recommended way to distinguish elements by visibility, as opposed to the `:visible` CSS pseudo-class.
1322
+ #
1323
+ # Note that visibility is checked every time the locator is used, and not at the moment of the [`method: Locator.visible`] call.
1324
+ #
1325
+ # **Usage**
1326
+ #
1327
+ # Consider a page with two buttons, the first invisible and the second visible.
1328
+ #
1329
+ # ```html
1330
+ # <button style='display: none'>Invisible</button>
1331
+ # <button>Visible</button>
1332
+ # ```
1333
+ #
1334
+ # This will only find the second button, because it is visible, and then click it.
1335
+ #
1336
+ # ```python sync
1337
+ # page.locator("button").visible.click()
1338
+ # ```
1339
+ #
1340
+ # To match invisible elements instead, use [`method: Locator.filter`] with the `visible` option set to `false`.
1341
+ def visible
1342
+ wrap_impl(@impl.visible)
1343
+ end
1344
+
1320
1345
  #
1321
1346
  # Returns when element specified by locator satisfies the `state` option.
1322
1347
  #
@@ -592,6 +592,10 @@ module Playwright
592
592
  # When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
593
593
  # in that iframe.
594
594
  #
595
+ # When called without `selector`, the search starts in any frame on the page - the main frame or any of
596
+ # the iframes - so that you don't need to locate each iframe first. Note that the rest of the locator is resolved
597
+ # inside a single frame, just like any other locator. If it matches elements inside multiple frames, an error is thrown.
598
+ #
595
599
  # **Usage**
596
600
  #
597
601
  # Following snippet locates element with text "Submit" in the iframe with id `my-frame`,
@@ -601,7 +605,14 @@ module Playwright
601
605
  # locator = page.frame_locator("#my-iframe").get_by_text("Submit")
602
606
  # locator.click()
603
607
  # ```
604
- def frame_locator(selector)
608
+ #
609
+ # Following snippet locates a button, either in the main frame or in one of the iframes:
610
+ #
611
+ # ```python sync
612
+ # locator = page.frame_locator().get_by_role("button")
613
+ # locator.click()
614
+ # ```
615
+ def frame_locator(selector = nil)
605
616
  wrap_impl(@impl.frame_locator(unwrap_impl(selector)))
606
617
  end
607
618
 
@@ -1895,13 +1906,13 @@ module Playwright
1895
1906
  end
1896
1907
 
1897
1908
  # @nodoc
1898
- def snapshot_for_ai(timeout: nil, depth: nil, boxes: nil)
1899
- wrap_impl(@impl.snapshot_for_ai(timeout: unwrap_impl(timeout), depth: unwrap_impl(depth), boxes: unwrap_impl(boxes)))
1909
+ def stop_js_coverage
1910
+ wrap_impl(@impl.stop_js_coverage)
1900
1911
  end
1901
1912
 
1902
1913
  # @nodoc
1903
- def _assertions(timeout, is_not, message)
1904
- wrap_impl(@impl._assertions(unwrap_impl(timeout), unwrap_impl(is_not), unwrap_impl(message)))
1914
+ def start_js_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
1915
+ wrap_impl(@impl.start_js_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
1905
1916
  end
1906
1917
 
1907
1918
  # @nodoc
@@ -1910,18 +1921,18 @@ module Playwright
1910
1921
  end
1911
1922
 
1912
1923
  # @nodoc
1913
- def stop_css_coverage
1914
- wrap_impl(@impl.stop_css_coverage)
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)))
1915
1926
  end
1916
1927
 
1917
1928
  # @nodoc
1918
- def start_js_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
1919
- wrap_impl(@impl.start_js_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
1929
+ def stop_css_coverage
1930
+ wrap_impl(@impl.stop_css_coverage)
1920
1931
  end
1921
1932
 
1922
1933
  # @nodoc
1923
- def stop_js_coverage
1924
- wrap_impl(@impl.stop_js_coverage)
1934
+ def _assertions(timeout, is_not, message)
1935
+ wrap_impl(@impl._assertions(unwrap_impl(timeout), unwrap_impl(is_not), unwrap_impl(message)))
1925
1936
  end
1926
1937
 
1927
1938
  # @nodoc
@@ -1936,20 +1947,20 @@ module Playwright
1936
1947
 
1937
1948
  # -- inherited from EventEmitter --
1938
1949
  # @nodoc
1939
- def once(event, callback)
1940
- event_emitter_proxy.once(event, callback)
1950
+ def off(event, callback)
1951
+ event_emitter_proxy.off(event, callback)
1941
1952
  end
1942
1953
 
1943
1954
  # -- inherited from EventEmitter --
1944
1955
  # @nodoc
1945
- def on(event, callback)
1946
- event_emitter_proxy.on(event, callback)
1956
+ def once(event, callback)
1957
+ event_emitter_proxy.once(event, callback)
1947
1958
  end
1948
1959
 
1949
1960
  # -- inherited from EventEmitter --
1950
1961
  # @nodoc
1951
- def off(event, callback)
1952
- event_emitter_proxy.off(event, callback)
1962
+ def on(event, callback)
1963
+ event_emitter_proxy.on(event, callback)
1953
1964
  end
1954
1965
 
1955
1966
  private def event_emitter_proxy
@@ -105,20 +105,20 @@ module Playwright
105
105
 
106
106
  # -- inherited from EventEmitter --
107
107
  # @nodoc
108
- def once(event, callback)
109
- event_emitter_proxy.once(event, callback)
108
+ def off(event, callback)
109
+ event_emitter_proxy.off(event, callback)
110
110
  end
111
111
 
112
112
  # -- inherited from EventEmitter --
113
113
  # @nodoc
114
- def on(event, callback)
115
- event_emitter_proxy.on(event, callback)
114
+ def once(event, callback)
115
+ event_emitter_proxy.once(event, callback)
116
116
  end
117
117
 
118
118
  # -- inherited from EventEmitter --
119
119
  # @nodoc
120
- def off(event, callback)
121
- event_emitter_proxy.off(event, callback)
120
+ def on(event, callback)
121
+ event_emitter_proxy.on(event, callback)
122
122
  end
123
123
 
124
124
  private def event_emitter_proxy
@@ -217,14 +217,20 @@ 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
+
220
225
  # @nodoc
221
226
  def apply_fallback_overrides(overrides)
222
227
  wrap_impl(@impl.apply_fallback_overrides(unwrap_impl(overrides)))
223
228
  end
224
229
 
230
+ # -- inherited from EventEmitter --
225
231
  # @nodoc
226
- def header_values(name)
227
- wrap_impl(@impl.header_values(unwrap_impl(name)))
232
+ def off(event, callback)
233
+ event_emitter_proxy.off(event, callback)
228
234
  end
229
235
 
230
236
  # -- inherited from EventEmitter --
@@ -239,12 +245,6 @@ module Playwright
239
245
  event_emitter_proxy.on(event, callback)
240
246
  end
241
247
 
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
@@ -135,20 +135,20 @@ module Playwright
135
135
 
136
136
  # -- inherited from EventEmitter --
137
137
  # @nodoc
138
- def once(event, callback)
139
- event_emitter_proxy.once(event, callback)
138
+ def off(event, callback)
139
+ event_emitter_proxy.off(event, callback)
140
140
  end
141
141
 
142
142
  # -- inherited from EventEmitter --
143
143
  # @nodoc
144
- def on(event, callback)
145
- event_emitter_proxy.on(event, callback)
144
+ def once(event, callback)
145
+ event_emitter_proxy.once(event, callback)
146
146
  end
147
147
 
148
148
  # -- inherited from EventEmitter --
149
149
  # @nodoc
150
- def off(event, callback)
151
- event_emitter_proxy.off(event, callback)
150
+ def on(event, callback)
151
+ event_emitter_proxy.on(event, callback)
152
152
  end
153
153
 
154
154
  private def event_emitter_proxy
@@ -179,20 +179,20 @@ module Playwright
179
179
 
180
180
  # -- inherited from EventEmitter --
181
181
  # @nodoc
182
- def once(event, callback)
183
- event_emitter_proxy.once(event, callback)
182
+ def off(event, callback)
183
+ event_emitter_proxy.off(event, callback)
184
184
  end
185
185
 
186
186
  # -- inherited from EventEmitter --
187
187
  # @nodoc
188
- def on(event, callback)
189
- event_emitter_proxy.on(event, callback)
188
+ def once(event, callback)
189
+ event_emitter_proxy.once(event, callback)
190
190
  end
191
191
 
192
192
  # -- inherited from EventEmitter --
193
193
  # @nodoc
194
- def off(event, callback)
195
- event_emitter_proxy.off(event, callback)
194
+ def on(event, callback)
195
+ event_emitter_proxy.on(event, callback)
196
196
  end
197
197
 
198
198
  private def event_emitter_proxy
@@ -34,13 +34,15 @@ module Playwright
34
34
  # context.tracing.stop(path = "trace.zip")
35
35
  # ```
36
36
  def start(
37
+ ariaSnapshots: nil,
37
38
  live: nil,
38
39
  name: nil,
39
40
  screenshots: nil,
41
+ screenSnapshots: nil,
40
42
  snapshots: nil,
41
43
  sources: nil,
42
44
  title: nil)
43
- wrap_impl(@impl.start(live: unwrap_impl(live), name: unwrap_impl(name), screenshots: unwrap_impl(screenshots), snapshots: unwrap_impl(snapshots), sources: unwrap_impl(sources), title: unwrap_impl(title)))
45
+ wrap_impl(@impl.start(ariaSnapshots: unwrap_impl(ariaSnapshots), live: unwrap_impl(live), name: unwrap_impl(name), screenshots: unwrap_impl(screenshots), screenSnapshots: unwrap_impl(screenSnapshots), snapshots: unwrap_impl(snapshots), sources: unwrap_impl(sources), title: unwrap_impl(title)))
44
46
  end
45
47
 
46
48
  #
@@ -70,7 +72,7 @@ module Playwright
70
72
  #
71
73
  # Start recording a HAR (HTTP Archive) of network activity in this context. The HAR file is written to disk when [`method: Tracing.stopHar`] is called, or when the returned `Disposable` is disposed.
72
74
  #
73
- # Only one HAR recording can be active at a time per `BrowserContext`.
75
+ # Only one HAR recording can be active at a time per `Tracing` instance.
74
76
  #
75
77
  # **Usage**
76
78
  #
@@ -129,20 +131,20 @@ module Playwright
129
131
 
130
132
  # -- inherited from EventEmitter --
131
133
  # @nodoc
132
- def once(event, callback)
133
- event_emitter_proxy.once(event, callback)
134
+ def off(event, callback)
135
+ event_emitter_proxy.off(event, callback)
134
136
  end
135
137
 
136
138
  # -- inherited from EventEmitter --
137
139
  # @nodoc
138
- def on(event, callback)
139
- event_emitter_proxy.on(event, callback)
140
+ def once(event, callback)
141
+ event_emitter_proxy.once(event, callback)
140
142
  end
141
143
 
142
144
  # -- inherited from EventEmitter --
143
145
  # @nodoc
144
- def off(event, callback)
145
- event_emitter_proxy.off(event, callback)
146
+ def on(event, callback)
147
+ event_emitter_proxy.on(event, callback)
146
148
  end
147
149
 
148
150
  private def event_emitter_proxy
@@ -36,20 +36,20 @@ module Playwright
36
36
 
37
37
  # -- inherited from EventEmitter --
38
38
  # @nodoc
39
- def once(event, callback)
40
- event_emitter_proxy.once(event, callback)
39
+ def off(event, callback)
40
+ event_emitter_proxy.off(event, callback)
41
41
  end
42
42
 
43
43
  # -- inherited from EventEmitter --
44
44
  # @nodoc
45
- def on(event, callback)
46
- event_emitter_proxy.on(event, callback)
45
+ def once(event, callback)
46
+ event_emitter_proxy.once(event, callback)
47
47
  end
48
48
 
49
49
  # -- inherited from EventEmitter --
50
50
  # @nodoc
51
- def off(event, callback)
52
- event_emitter_proxy.off(event, callback)
51
+ def on(event, callback)
52
+ event_emitter_proxy.on(event, callback)
53
53
  end
54
54
 
55
55
  private def event_emitter_proxy