playwright-ruby-client 1.60.0 → 1.62.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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -17
  3. data/documentation/docs/api/api_response.md +30 -0
  4. data/documentation/docs/api/browser_context.md +11 -3
  5. data/documentation/docs/api/browser_type.md +3 -0
  6. data/documentation/docs/api/credentials.md +136 -0
  7. data/documentation/docs/api/element_handle.md +7 -0
  8. data/documentation/docs/api/frame.md +12 -4
  9. data/documentation/docs/api/locator.md +29 -0
  10. data/documentation/docs/api/locator_assertions.md +4 -2
  11. data/documentation/docs/api/page.md +26 -2
  12. data/documentation/docs/api/playwright.md +2 -2
  13. data/documentation/docs/api/touchscreen.md +1 -1
  14. data/documentation/docs/api/web_storage.md +65 -0
  15. data/documentation/docs/article/getting_started.md +12 -11
  16. data/documentation/docs/article/guides/download_playwright_driver.md +11 -32
  17. data/documentation/docs/article/guides/launch_browser.md +5 -4
  18. data/documentation/docs/article/guides/playwright_on_alpine_linux.md +6 -5
  19. data/documentation/docs/article/guides/rails_integration.md +72 -4
  20. data/documentation/docs/article/guides/rails_integration_with_null_driver.md +4 -3
  21. data/documentation/docs/article/guides/semi_automation.md +1 -1
  22. data/documentation/docs/article/guides/use_storage_state.md +1 -1
  23. data/documentation/docs/include/api_coverage.md +22 -0
  24. data/documentation/docusaurus.config.js +31 -0
  25. data/documentation/package.json +3 -0
  26. data/documentation/yarn.lock +159 -174
  27. data/lib/playwright/api_response_impl.rb +24 -0
  28. data/lib/playwright/channel_owners/browser_context.rb +8 -3
  29. data/lib/playwright/channel_owners/browser_type.rb +2 -1
  30. data/lib/playwright/channel_owners/element_handle.rb +14 -4
  31. data/lib/playwright/channel_owners/frame.rb +50 -17
  32. data/lib/playwright/channel_owners/page.rb +31 -10
  33. data/lib/playwright/connection.rb +16 -2
  34. data/lib/playwright/credentials_impl.rb +35 -0
  35. data/lib/playwright/errors.rb +4 -1
  36. data/lib/playwright/locator_assertions_impl.rb +14 -1
  37. data/lib/playwright/locator_impl.rb +28 -5
  38. data/lib/playwright/locator_utils.rb +9 -1
  39. data/lib/playwright/screencast.rb +22 -6
  40. data/lib/playwright/screenshot_utils.rb +24 -0
  41. data/lib/playwright/test.rb +12 -2
  42. data/lib/playwright/url_matcher.rb +120 -4
  43. data/lib/playwright/version.rb +2 -2
  44. data/lib/playwright/waiter.rb +9 -41
  45. data/lib/playwright/web_storage_impl.rb +34 -0
  46. data/lib/playwright.rb +2 -2
  47. data/lib/playwright_api/api_request_context.rb +6 -6
  48. data/lib/playwright_api/api_response.rb +21 -0
  49. data/lib/playwright_api/browser.rb +6 -6
  50. data/lib/playwright_api/browser_context.rb +27 -18
  51. data/lib/playwright_api/browser_type.rb +10 -7
  52. data/lib/playwright_api/cdp_session.rb +6 -6
  53. data/lib/playwright_api/credentials.rb +124 -0
  54. data/lib/playwright_api/dialog.rb +6 -6
  55. data/lib/playwright_api/element_handle.rb +20 -13
  56. data/lib/playwright_api/frame.rb +36 -28
  57. data/lib/playwright_api/js_handle.rb +6 -6
  58. data/lib/playwright_api/locator.rb +37 -11
  59. data/lib/playwright_api/locator_assertions.rb +6 -4
  60. data/lib/playwright_api/page.rb +55 -29
  61. data/lib/playwright_api/playwright.rb +6 -6
  62. data/lib/playwright_api/request.rb +6 -6
  63. data/lib/playwright_api/response.rb +6 -6
  64. data/lib/playwright_api/route.rb +6 -6
  65. data/lib/playwright_api/touchscreen.rb +1 -1
  66. data/lib/playwright_api/tracing.rb +6 -6
  67. data/lib/playwright_api/web_socket.rb +6 -6
  68. data/lib/playwright_api/web_storage.rb +48 -0
  69. data/lib/playwright_api/worker.rb +6 -6
  70. data/playwright.gemspec +5 -0
  71. data/sig/playwright.rbs +62 -40
  72. metadata +13 -3
@@ -25,6 +25,13 @@ module Playwright
25
25
  wrap_impl(@impl.clock)
26
26
  end
27
27
 
28
+ #
29
+ # Virtual WebAuthn authenticator for this context. Lets tests seed credentials and intercept
30
+ # `navigator.credentials.create()` / `navigator.credentials.get()` ceremonies.
31
+ def credentials # property
32
+ wrap_impl(@impl.credentials)
33
+ end
34
+
28
35
  #
29
36
  # Debugger allows to pause and resume the execution.
30
37
  def debugger # property
@@ -416,13 +423,15 @@ module Playwright
416
423
  alias_method :offline=, :set_offline
417
424
 
418
425
  #
419
- # Returns storage state for this browser context, contains current cookies, local storage snapshot and IndexedDB snapshot.
420
- def storage_state(indexedDB: nil, path: nil)
421
- wrap_impl(@impl.storage_state(indexedDB: unwrap_impl(indexedDB), path: unwrap_impl(path)))
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)))
422
429
  end
423
430
 
424
431
  #
425
- # Clears the existing cookies, local storage and IndexedDB entries for all origins and sets the new storage state.
432
+ # Clears the existing cookies, local storage, IndexedDB entries and virtual WebAuthn credentials, and sets the new storage
433
+ # state. When the storage state contains credentials, the virtual WebAuthn authenticator is installed (equivalent to
434
+ # [`method: Credentials.install`]), preventing all real authenticators from working in this context.
426
435
  #
427
436
  # **Usage**
428
437
  #
@@ -490,13 +499,18 @@ module Playwright
490
499
  end
491
500
 
492
501
  # @nodoc
493
- def pause
494
- wrap_impl(@impl.pause)
502
+ def browser=(req)
503
+ wrap_impl(@impl.browser=(unwrap_impl(req)))
495
504
  end
496
505
 
497
506
  # @nodoc
498
- def owner_page=(req)
499
- wrap_impl(@impl.owner_page=(unwrap_impl(req)))
507
+ def enable_debug_console!
508
+ wrap_impl(@impl.enable_debug_console!)
509
+ end
510
+
511
+ # @nodoc
512
+ def pause
513
+ wrap_impl(@impl.pause)
500
514
  end
501
515
 
502
516
  # @nodoc
@@ -505,13 +519,14 @@ module Playwright
505
519
  end
506
520
 
507
521
  # @nodoc
508
- def browser=(req)
509
- wrap_impl(@impl.browser=(unwrap_impl(req)))
522
+ def owner_page=(req)
523
+ wrap_impl(@impl.owner_page=(unwrap_impl(req)))
510
524
  end
511
525
 
526
+ # -- inherited from EventEmitter --
512
527
  # @nodoc
513
- def enable_debug_console!
514
- wrap_impl(@impl.enable_debug_console!)
528
+ def once(event, callback)
529
+ event_emitter_proxy.once(event, callback)
515
530
  end
516
531
 
517
532
  # -- inherited from EventEmitter --
@@ -526,12 +541,6 @@ module Playwright
526
541
  event_emitter_proxy.off(event, callback)
527
542
  end
528
543
 
529
- # -- inherited from EventEmitter --
530
- # @nodoc
531
- def once(event, callback)
532
- event_emitter_proxy.once(event, callback)
533
- end
534
-
535
544
  private def event_emitter_proxy
536
545
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
537
546
  end
@@ -42,6 +42,8 @@ module Playwright
42
42
  #
43
43
  # **NOTE**: This connection is significantly lower fidelity than the Playwright protocol connection via [`method: BrowserType.connect`]. If you are experiencing issues or attempting to use advanced functionality, you probably want to use [`method: BrowserType.connect`].
44
44
  #
45
+ # **NOTE**: Playwright maintains a curated list of arguments for launching the browser. If you launch the browser without Playwright and do not pass the exact same arguments, some of Playwright functionality may be broken upon connecting to the browser.
46
+ #
45
47
  # **Usage**
46
48
  #
47
49
  # ```python sync
@@ -51,13 +53,14 @@ module Playwright
51
53
  # ```
52
54
  def connect_over_cdp(
53
55
  endpointURL,
56
+ artifactsDir: nil,
54
57
  headers: nil,
55
58
  isLocal: nil,
56
59
  noDefaults: nil,
57
60
  slowMo: nil,
58
61
  timeout: nil,
59
62
  &block)
60
- wrap_impl(@impl.connect_over_cdp(unwrap_impl(endpointURL), headers: unwrap_impl(headers), isLocal: unwrap_impl(isLocal), noDefaults: unwrap_impl(noDefaults), slowMo: unwrap_impl(slowMo), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
63
+ wrap_impl(@impl.connect_over_cdp(unwrap_impl(endpointURL), artifactsDir: unwrap_impl(artifactsDir), headers: unwrap_impl(headers), isLocal: unwrap_impl(isLocal), noDefaults: unwrap_impl(noDefaults), slowMo: unwrap_impl(slowMo), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
61
64
  end
62
65
 
63
66
  #
@@ -185,20 +188,20 @@ module Playwright
185
188
 
186
189
  # -- inherited from EventEmitter --
187
190
  # @nodoc
188
- def on(event, callback)
189
- event_emitter_proxy.on(event, callback)
191
+ def once(event, callback)
192
+ event_emitter_proxy.once(event, callback)
190
193
  end
191
194
 
192
195
  # -- inherited from EventEmitter --
193
196
  # @nodoc
194
- def off(event, callback)
195
- event_emitter_proxy.off(event, callback)
197
+ def on(event, callback)
198
+ event_emitter_proxy.on(event, callback)
196
199
  end
197
200
 
198
201
  # -- inherited from EventEmitter --
199
202
  # @nodoc
200
- def once(event, callback)
201
- event_emitter_proxy.once(event, callback)
203
+ def off(event, callback)
204
+ event_emitter_proxy.off(event, callback)
202
205
  end
203
206
 
204
207
  private def event_emitter_proxy
@@ -33,20 +33,20 @@ module Playwright
33
33
 
34
34
  # -- inherited from EventEmitter --
35
35
  # @nodoc
36
- def on(event, callback)
37
- event_emitter_proxy.on(event, callback)
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 off(event, callback)
43
- event_emitter_proxy.off(event, callback)
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 once(event, callback)
49
- event_emitter_proxy.once(event, callback)
48
+ def off(event, callback)
49
+ event_emitter_proxy.off(event, callback)
50
50
  end
51
51
 
52
52
  private def event_emitter_proxy
@@ -0,0 +1,124 @@
1
+ module Playwright
2
+ #
3
+ # `Credentials` is a virtual WebAuthn authenticator scoped to a `BrowserContext`. It lets tests
4
+ # register passkeys and answer `navigator.credentials.create()` / `navigator.credentials.get()`
5
+ # ceremonies in the page, without a real authenticator or hardware security key.
6
+ #
7
+ # There are three common ways to use it:
8
+ #
9
+ # **Usage: seed a known credential**
10
+ #
11
+ # ```python sync
12
+ # context = browser.new_context()
13
+ #
14
+ # # A passkey your backend already provisioned for a test user.
15
+ # context.credentials.create(
16
+ # "example.com",
17
+ # id=known_credential_id, # base64url
18
+ # user_handle=known_user_handle, # base64url
19
+ # private_key=known_private_key, # base64url PKCS#8 (DER)
20
+ # public_key=known_public_key, # base64url SPKI (DER)
21
+ # )
22
+ # context.credentials.install()
23
+ #
24
+ # page = context.new_page()
25
+ # page.goto("https://example.com/login")
26
+ # # The page's navigator.credentials.get() is answered with the seeded passkey.
27
+ # ```
28
+ #
29
+ # **Usage: capture a credential, then reuse it**
30
+ #
31
+ # ```python sync
32
+ # # setup test: let the app register a passkey, then save it.
33
+ # context = browser.new_context()
34
+ # context.credentials.install()
35
+ #
36
+ # page = context.new_page()
37
+ # page.goto("https://example.com/register")
38
+ # page.get_by_role("button", name="Create a passkey").click()
39
+ #
40
+ # # Read back the passkey the page registered — it includes the private key.
41
+ # [credential] = context.credentials.get(rp_id="example.com")
42
+ # with open("playwright/.auth/passkey.json", "w") as f:
43
+ # json.dump(credential, f)
44
+ # ```
45
+ #
46
+ # ```python sync
47
+ # # later test: seed the captured passkey so the app starts already enrolled.
48
+ # with open("playwright/.auth/passkey.json") as f:
49
+ # credential = json.load(f)
50
+ # context = browser.new_context()
51
+ # context.credentials.create(
52
+ # credential["rpId"],
53
+ # id=credential["id"],
54
+ # user_handle=credential["userHandle"],
55
+ # private_key=credential["privateKey"],
56
+ # public_key=credential["publicKey"],
57
+ # )
58
+ # context.credentials.install()
59
+ #
60
+ # page = context.new_page()
61
+ # page.goto("https://example.com/login")
62
+ # # navigator.credentials.get() resolves the captured passkey — already signed in.
63
+ # ```
64
+ #
65
+ # **Usage: save credentials in the storage state, restore later**
66
+ #
67
+ # See [authentication guide](../auth.md) for examples of using saving and resotring the storage state.
68
+ #
69
+ # **Defaults**
70
+ class Credentials < PlaywrightApi
71
+
72
+ #
73
+ # Installs the virtual WebAuthn authenticator into the context, overriding
74
+ # `navigator.credentials.create()` and `navigator.credentials.get()` in all current
75
+ # and future pages. Call this before the page first touches `navigator.credentials`.
76
+ #
77
+ # Required: until [`method: Credentials.install`] is called, no interception is in place and the page sees
78
+ # the platform's native (or absent) WebAuthn behaviour. Seeding credentials with
79
+ # [`method: Credentials.create`] without installing populates the authenticator, but the
80
+ # page will never see those credentials.
81
+ def install
82
+ wrap_impl(@impl.install)
83
+ end
84
+
85
+ #
86
+ # Seeds a virtual WebAuthn credential and returns it.
87
+ #
88
+ # With only `rpId`, generates a fresh **ECDSA P-256** keypair, credential id and user handle. The
89
+ # seeded credential is discoverable (resident), so the page can resolve it from both
90
+ # username-then-passkey and usernameless passkey flows. The returned object carries the private and public keys, so it can be persisted to disk and re-seeded in a later test.
91
+ #
92
+ # To **import a known credential**, supply all four of `id`, `userHandle`, `privateKey` and
93
+ # `publicKey` together.
94
+ #
95
+ # Call [`method: Credentials.install`] before navigating to a page that uses WebAuthn.
96
+ def create(
97
+ rpId,
98
+ id: nil,
99
+ privateKey: nil,
100
+ publicKey: nil,
101
+ userHandle: nil)
102
+ wrap_impl(@impl.create(unwrap_impl(rpId), id: unwrap_impl(id), privateKey: unwrap_impl(privateKey), publicKey: unwrap_impl(publicKey), userHandle: unwrap_impl(userHandle)))
103
+ end
104
+
105
+ #
106
+ # Removes a credential from the authenticator by its id. Works for any credential currently held —
107
+ # both those seeded with [`method: Credentials.create`] and those the page registered itself by
108
+ # calling `navigator.credentials.create()`.
109
+ def delete(id)
110
+ wrap_impl(@impl.delete(unwrap_impl(id)))
111
+ end
112
+
113
+ #
114
+ # Returns every credential currently held by the authenticator, optionally filtered by `rpId` or
115
+ # `id`. This includes both credentials seeded with [`method: Credentials.create`] and credentials
116
+ # the page registered itself by calling `navigator.credentials.create()`.
117
+ #
118
+ # Each returned credential includes its private and public keys, so a passkey the app just
119
+ # registered can be saved and re-seeded into a later test with [`method: Credentials.create`] — see the second example in the class overview.
120
+ def get(id: nil, rpId: nil)
121
+ wrap_impl(@impl.get(id: unwrap_impl(id), rpId: unwrap_impl(rpId)))
122
+ end
123
+ end
124
+ end
@@ -70,20 +70,20 @@ module Playwright
70
70
 
71
71
  # -- inherited from EventEmitter --
72
72
  # @nodoc
73
- def on(event, callback)
74
- event_emitter_proxy.on(event, callback)
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 off(event, callback)
80
- event_emitter_proxy.off(event, callback)
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 once(event, callback)
86
- event_emitter_proxy.once(event, callback)
85
+ def off(event, callback)
86
+ event_emitter_proxy.off(event, callback)
87
87
  end
88
88
 
89
89
  private def event_emitter_proxy
@@ -76,9 +76,10 @@ module Playwright
76
76
  force: nil,
77
77
  noWaitAfter: nil,
78
78
  position: nil,
79
+ scroll: nil,
79
80
  timeout: nil,
80
81
  trial: nil)
81
- wrap_impl(@impl.check(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
82
+ wrap_impl(@impl.check(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
82
83
  end
83
84
 
84
85
  #
@@ -100,10 +101,11 @@ module Playwright
100
101
  modifiers: nil,
101
102
  noWaitAfter: nil,
102
103
  position: nil,
104
+ scroll: nil,
103
105
  steps: nil,
104
106
  timeout: nil,
105
107
  trial: nil)
106
- wrap_impl(@impl.click(button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
108
+ wrap_impl(@impl.click(button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
107
109
  end
108
110
 
109
111
  #
@@ -131,10 +133,11 @@ module Playwright
131
133
  modifiers: nil,
132
134
  noWaitAfter: nil,
133
135
  position: nil,
136
+ scroll: nil,
134
137
  steps: nil,
135
138
  timeout: nil,
136
139
  trial: nil)
137
- 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), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
140
+ 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), scroll: unwrap_impl(scroll), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
138
141
  end
139
142
 
140
143
  #
@@ -260,9 +263,10 @@ module Playwright
260
263
  modifiers: nil,
261
264
  noWaitAfter: nil,
262
265
  position: nil,
266
+ scroll: nil,
263
267
  timeout: nil,
264
268
  trial: nil)
265
- wrap_impl(@impl.hover(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
269
+ wrap_impl(@impl.hover(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
266
270
  end
267
271
 
268
272
  #
@@ -455,9 +459,10 @@ module Playwright
455
459
  force: nil,
456
460
  noWaitAfter: nil,
457
461
  position: nil,
462
+ scroll: nil,
458
463
  timeout: nil,
459
464
  trial: nil)
460
- wrap_impl(@impl.set_checked(unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
465
+ wrap_impl(@impl.set_checked(unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
461
466
  end
462
467
  alias_method :checked=, :set_checked
463
468
 
@@ -490,9 +495,10 @@ module Playwright
490
495
  modifiers: nil,
491
496
  noWaitAfter: nil,
492
497
  position: nil,
498
+ scroll: nil,
493
499
  timeout: nil,
494
500
  trial: nil)
495
- wrap_impl(@impl.tap_point(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
501
+ wrap_impl(@impl.tap_point(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
496
502
  end
497
503
 
498
504
  #
@@ -529,9 +535,10 @@ module Playwright
529
535
  force: nil,
530
536
  noWaitAfter: nil,
531
537
  position: nil,
538
+ scroll: nil,
532
539
  timeout: nil,
533
540
  trial: nil)
534
- wrap_impl(@impl.uncheck(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
541
+ 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)))
535
542
  end
536
543
 
537
544
  #
@@ -576,20 +583,20 @@ module Playwright
576
583
 
577
584
  # -- inherited from EventEmitter --
578
585
  # @nodoc
579
- def on(event, callback)
580
- event_emitter_proxy.on(event, callback)
586
+ def once(event, callback)
587
+ event_emitter_proxy.once(event, callback)
581
588
  end
582
589
 
583
590
  # -- inherited from EventEmitter --
584
591
  # @nodoc
585
- def off(event, callback)
586
- event_emitter_proxy.off(event, callback)
592
+ def on(event, callback)
593
+ event_emitter_proxy.on(event, callback)
587
594
  end
588
595
 
589
596
  # -- inherited from EventEmitter --
590
597
  # @nodoc
591
- def once(event, callback)
592
- event_emitter_proxy.once(event, callback)
598
+ def off(event, callback)
599
+ event_emitter_proxy.off(event, callback)
593
600
  end
594
601
 
595
602
  private def event_emitter_proxy
@@ -64,10 +64,11 @@ module Playwright
64
64
  force: nil,
65
65
  noWaitAfter: nil,
66
66
  position: nil,
67
+ scroll: nil,
67
68
  strict: nil,
68
69
  timeout: nil,
69
70
  trial: nil)
70
- wrap_impl(@impl.check(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
71
+ wrap_impl(@impl.check(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
71
72
  end
72
73
 
73
74
  def child_frames
@@ -93,10 +94,11 @@ module Playwright
93
94
  modifiers: nil,
94
95
  noWaitAfter: nil,
95
96
  position: nil,
97
+ scroll: nil,
96
98
  strict: nil,
97
99
  timeout: nil,
98
100
  trial: nil)
99
- wrap_impl(@impl.click(unwrap_impl(selector), button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
101
+ wrap_impl(@impl.click(unwrap_impl(selector), button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
100
102
  end
101
103
 
102
104
  #
@@ -124,10 +126,11 @@ module Playwright
124
126
  modifiers: nil,
125
127
  noWaitAfter: nil,
126
128
  position: nil,
129
+ scroll: nil,
127
130
  strict: nil,
128
131
  timeout: nil,
129
132
  trial: nil)
130
- wrap_impl(@impl.dblclick(unwrap_impl(selector), button: unwrap_impl(button), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
133
+ wrap_impl(@impl.dblclick(unwrap_impl(selector), button: unwrap_impl(button), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
131
134
  end
132
135
 
133
136
  #
@@ -179,13 +182,14 @@ module Playwright
179
182
  target,
180
183
  force: nil,
181
184
  noWaitAfter: nil,
185
+ scroll: nil,
182
186
  sourcePosition: nil,
183
187
  steps: nil,
184
188
  strict: nil,
185
189
  targetPosition: nil,
186
190
  timeout: nil,
187
191
  trial: nil)
188
- wrap_impl(@impl.drag_and_drop(unwrap_impl(source), unwrap_impl(target), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), sourcePosition: unwrap_impl(sourcePosition), steps: unwrap_impl(steps), strict: unwrap_impl(strict), targetPosition: unwrap_impl(targetPosition), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
192
+ wrap_impl(@impl.drag_and_drop(unwrap_impl(source), unwrap_impl(target), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), scroll: unwrap_impl(scroll), sourcePosition: unwrap_impl(sourcePosition), steps: unwrap_impl(steps), strict: unwrap_impl(strict), targetPosition: unwrap_impl(targetPosition), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
189
193
  end
190
194
 
191
195
  #
@@ -255,7 +259,7 @@ module Playwright
255
259
  # `ElementHandle` instances can be passed as an argument to the [`method: Frame.evaluate`]:
256
260
  #
257
261
  # ```python sync
258
- # body_handle = frame.evaluate("document.body")
262
+ # body_handle = frame.evaluate_handle("document.body")
259
263
  # html = frame.evaluate("([body, suffix]) => body.innerHTML + suffix", [body_handle, "hello"])
260
264
  # body_handle.dispose()
261
265
  # ```
@@ -282,14 +286,14 @@ module Playwright
282
286
  # A string can also be passed in instead of a function.
283
287
  #
284
288
  # ```python sync
285
- # a_handle = page.evaluate_handle("document") # handle for the "document"
289
+ # a_handle = frame.evaluate_handle("document") # handle for the "document"
286
290
  # ```
287
291
  #
288
292
  # `JSHandle` instances can be passed as an argument to the [`method: Frame.evaluateHandle`]:
289
293
  #
290
294
  # ```python sync
291
- # a_handle = page.evaluate_handle("document.body")
292
- # result_handle = page.evaluate_handle("body => body.innerHTML", a_handle)
295
+ # a_handle = frame.evaluate_handle("document.body")
296
+ # result_handle = frame.evaluate_handle("body => body.innerHTML", a_handle)
293
297
  # print(result_handle.json_value())
294
298
  # result_handle.dispose()
295
299
  # ```
@@ -592,10 +596,11 @@ module Playwright
592
596
  modifiers: nil,
593
597
  noWaitAfter: nil,
594
598
  position: nil,
599
+ scroll: nil,
595
600
  strict: nil,
596
601
  timeout: nil,
597
602
  trial: nil)
598
- wrap_impl(@impl.hover(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
603
+ wrap_impl(@impl.hover(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
599
604
  end
600
605
 
601
606
  #
@@ -799,10 +804,11 @@ module Playwright
799
804
  force: nil,
800
805
  noWaitAfter: nil,
801
806
  position: nil,
807
+ scroll: nil,
802
808
  strict: nil,
803
809
  timeout: nil,
804
810
  trial: nil)
805
- wrap_impl(@impl.set_checked(unwrap_impl(selector), unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
811
+ wrap_impl(@impl.set_checked(unwrap_impl(selector), unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
806
812
  end
807
813
 
808
814
  #
@@ -844,10 +850,11 @@ module Playwright
844
850
  modifiers: nil,
845
851
  noWaitAfter: nil,
846
852
  position: nil,
853
+ scroll: nil,
847
854
  strict: nil,
848
855
  timeout: nil,
849
856
  trial: nil)
850
- wrap_impl(@impl.tap_point(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
857
+ wrap_impl(@impl.tap_point(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
851
858
  end
852
859
 
853
860
  #
@@ -897,10 +904,11 @@ module Playwright
897
904
  force: nil,
898
905
  noWaitAfter: nil,
899
906
  position: nil,
907
+ scroll: nil,
900
908
  strict: nil,
901
909
  timeout: nil,
902
910
  trial: nil)
903
- wrap_impl(@impl.uncheck(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
911
+ wrap_impl(@impl.uncheck(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
904
912
  end
905
913
 
906
914
  #
@@ -1041,21 +1049,11 @@ module Playwright
1041
1049
  wrap_impl(@impl.wait_for_url(unwrap_impl(url), timeout: unwrap_impl(timeout), waitUntil: unwrap_impl(waitUntil)))
1042
1050
  end
1043
1051
 
1044
- # @nodoc
1045
- def detached=(req)
1046
- wrap_impl(@impl.detached=(unwrap_impl(req)))
1047
- end
1048
-
1049
1052
  # @nodoc
1050
1053
  def drop(selector, payload, position: nil, strict: nil, timeout: nil)
1051
1054
  wrap_impl(@impl.drop(unwrap_impl(selector), unwrap_impl(payload), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
1052
1055
  end
1053
1056
 
1054
- # @nodoc
1055
- def highlight(selector, style: nil)
1056
- wrap_impl(@impl.highlight(unwrap_impl(selector), style: unwrap_impl(style)))
1057
- end
1058
-
1059
1057
  # @nodoc
1060
1058
  def hide_highlight(selector)
1061
1059
  wrap_impl(@impl.hide_highlight(unwrap_impl(selector)))
@@ -1066,16 +1064,14 @@ module Playwright
1066
1064
  wrap_impl(@impl.expect(unwrap_impl(selector), unwrap_impl(expression), unwrap_impl(options), unwrap_impl(title)))
1067
1065
  end
1068
1066
 
1069
- # -- inherited from EventEmitter --
1070
1067
  # @nodoc
1071
- def on(event, callback)
1072
- event_emitter_proxy.on(event, callback)
1068
+ def detached=(req)
1069
+ wrap_impl(@impl.detached=(unwrap_impl(req)))
1073
1070
  end
1074
1071
 
1075
- # -- inherited from EventEmitter --
1076
1072
  # @nodoc
1077
- def off(event, callback)
1078
- event_emitter_proxy.off(event, callback)
1073
+ def highlight(selector, style: nil)
1074
+ wrap_impl(@impl.highlight(unwrap_impl(selector), style: unwrap_impl(style)))
1079
1075
  end
1080
1076
 
1081
1077
  # -- inherited from EventEmitter --
@@ -1084,6 +1080,18 @@ module Playwright
1084
1080
  event_emitter_proxy.once(event, callback)
1085
1081
  end
1086
1082
 
1083
+ # -- inherited from EventEmitter --
1084
+ # @nodoc
1085
+ def on(event, callback)
1086
+ event_emitter_proxy.on(event, callback)
1087
+ end
1088
+
1089
+ # -- inherited from EventEmitter --
1090
+ # @nodoc
1091
+ def off(event, callback)
1092
+ event_emitter_proxy.off(event, callback)
1093
+ end
1094
+
1087
1095
  private def event_emitter_proxy
1088
1096
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
1089
1097
  end
@@ -100,20 +100,20 @@ module Playwright
100
100
 
101
101
  # -- inherited from EventEmitter --
102
102
  # @nodoc
103
- def on(event, callback)
104
- event_emitter_proxy.on(event, callback)
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 off(event, callback)
110
- event_emitter_proxy.off(event, callback)
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 once(event, callback)
116
- event_emitter_proxy.once(event, callback)
115
+ def off(event, callback)
116
+ event_emitter_proxy.off(event, callback)
117
117
  end
118
118
 
119
119
  private def event_emitter_proxy