playwright-ruby-client 1.61.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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -17
  3. data/documentation/docs/api/api_response.md +12 -0
  4. data/documentation/docs/api/browser_context.md +5 -3
  5. data/documentation/docs/api/browser_type.md +2 -0
  6. data/documentation/docs/api/credentials.md +6 -2
  7. data/documentation/docs/api/element_handle.md +7 -0
  8. data/documentation/docs/api/frame.md +8 -0
  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 +14 -0
  12. data/documentation/docs/api/playwright.md +2 -2
  13. data/documentation/docs/article/getting_started.md +12 -11
  14. data/documentation/docs/article/guides/download_playwright_driver.md +11 -32
  15. data/documentation/docs/article/guides/launch_browser.md +5 -4
  16. data/documentation/docs/article/guides/playwright_on_alpine_linux.md +6 -5
  17. data/documentation/docs/article/guides/rails_integration.md +72 -4
  18. data/documentation/docs/article/guides/rails_integration_with_null_driver.md +4 -3
  19. data/documentation/docs/article/guides/semi_automation.md +1 -1
  20. data/documentation/docs/article/guides/use_storage_state.md +1 -1
  21. data/documentation/docs/include/api_coverage.md +2 -0
  22. data/documentation/docusaurus.config.js +31 -0
  23. data/documentation/package.json +3 -0
  24. data/documentation/yarn.lock +159 -174
  25. data/lib/playwright/api_response_impl.rb +16 -0
  26. data/lib/playwright/channel_owners/browser_context.rb +6 -2
  27. data/lib/playwright/channel_owners/element_handle.rb +14 -4
  28. data/lib/playwright/channel_owners/frame.rb +14 -0
  29. data/lib/playwright/channel_owners/page.rb +19 -8
  30. data/lib/playwright/connection.rb +9 -1
  31. data/lib/playwright/locator_assertions_impl.rb +14 -1
  32. data/lib/playwright/locator_impl.rb +28 -5
  33. data/lib/playwright/screencast.rb +20 -6
  34. data/lib/playwright/screenshot_utils.rb +24 -0
  35. data/lib/playwright/test.rb +12 -2
  36. data/lib/playwright/url_matcher.rb +120 -4
  37. data/lib/playwright/version.rb +2 -2
  38. data/lib/playwright.rb +2 -2
  39. data/lib/playwright_api/api_request_context.rb +6 -6
  40. data/lib/playwright_api/api_response.rb +9 -0
  41. data/lib/playwright_api/browser.rb +6 -6
  42. data/lib/playwright_api/browser_context.rb +14 -12
  43. data/lib/playwright_api/browser_type.rb +8 -6
  44. data/lib/playwright_api/cdp_session.rb +6 -6
  45. data/lib/playwright_api/credentials.rb +6 -2
  46. data/lib/playwright_api/dialog.rb +6 -6
  47. data/lib/playwright_api/element_handle.rb +20 -13
  48. data/lib/playwright_api/frame.rb +29 -21
  49. data/lib/playwright_api/js_handle.rb +6 -6
  50. data/lib/playwright_api/locator.rb +39 -13
  51. data/lib/playwright_api/locator_assertions.rb +6 -4
  52. data/lib/playwright_api/page.rb +37 -23
  53. data/lib/playwright_api/playwright.rb +6 -6
  54. data/lib/playwright_api/request.rb +8 -8
  55. data/lib/playwright_api/response.rb +6 -6
  56. data/lib/playwright_api/route.rb +6 -6
  57. data/lib/playwright_api/tracing.rb +6 -6
  58. data/lib/playwright_api/web_socket.rb +6 -6
  59. data/lib/playwright_api/worker.rb +8 -8
  60. data/playwright.gemspec +5 -0
  61. data/sig/playwright.rbs +41 -39
  62. metadata +7 -3
@@ -23,7 +23,7 @@ module Playwright
23
23
  def match?(target_url)
24
24
  case @url
25
25
  when String
26
- joined_url == target_url || File.fnmatch?(@url, target_url)
26
+ joined_url == target_url || File.fnmatch?(joined_url, target_url)
27
27
  when Regexp
28
28
  @url.match?(target_url)
29
29
  else
@@ -32,13 +32,129 @@ module Playwright
32
32
  end
33
33
 
34
34
  private def joined_url
35
- if @base_url && !@url.start_with?('*')
36
- URI.join(@base_url, @url).to_s
35
+ normalized_url = normalize_literal_url(@url)
36
+ if @base_url && !normalized_url.start_with?('*')
37
+ normalize_literal_url(URI.join(normalize_literal_url(@base_url), normalized_url).to_s)
37
38
  else
38
- @url
39
+ normalized_url
39
40
  end
40
41
  end
41
42
 
43
+ private def normalize_literal_url(url)
44
+ match = url.match(/\A([a-z][a-z0-9+.-]*):\/\/([^\/?#]*)(.*)\z/i)
45
+ return percent_encode_literal_characters(url) unless match
46
+
47
+ scheme = match[1].downcase
48
+ authority = match[2]
49
+ suffix = percent_encode_literal_characters(match[3])
50
+
51
+ before, separator, after = authority.rpartition('@')
52
+ if separator.empty?
53
+ userinfo = nil
54
+ host_port = authority
55
+ else
56
+ userinfo = before
57
+ host_port = after
58
+ end
59
+
60
+ if host_port.start_with?('[')
61
+ host = host_port
62
+ port = nil
63
+ else
64
+ host, separator, candidate_port = host_port.rpartition(':')
65
+ if separator.empty? || candidate_port !~ /\A\d+\z/
66
+ host = host_port
67
+ port = nil
68
+ else
69
+ port = candidate_port
70
+ end
71
+ host = host.split('.').map { |label| punycode_label(label.downcase) }.join('.')
72
+ end
73
+
74
+ port = nil if (scheme == 'http' && port == '80') || (scheme == 'https' && port == '443')
75
+ normalized_authority = String.new
76
+ normalized_authority << "#{userinfo}@" if userinfo
77
+ normalized_authority << host
78
+ normalized_authority << ":#{port}" if port
79
+ "#{scheme}://#{normalized_authority}#{suffix}"
80
+ end
81
+
82
+ private def percent_encode_literal_characters(value)
83
+ value.each_char.map do |char|
84
+ if char == ' '
85
+ '%20'
86
+ elsif char.ascii_only?
87
+ char
88
+ else
89
+ char.encode(Encoding::UTF_8).bytes.map { |byte| format('%%%02X', byte) }.join
90
+ end
91
+ end.join
92
+ end
93
+
94
+ # RFC 3492 Punycode encoder for the non-ASCII URL host labels normalized by WHATWG URL.
95
+ private def punycode_label(label)
96
+ return label if label.ascii_only?
97
+
98
+ codepoints = label.codepoints
99
+ output = codepoints.select { |codepoint| codepoint < 0x80 }.map(&:chr).join
100
+ basic_length = output.length
101
+ output << '-' if basic_length > 0
102
+
103
+ handled = basic_length
104
+ n = 128
105
+ delta = 0
106
+ bias = 72
107
+ while handled < codepoints.length
108
+ next_codepoint = codepoints.select { |codepoint| codepoint >= n }.min
109
+ delta += (next_codepoint - n) * (handled + 1)
110
+ n = next_codepoint
111
+
112
+ codepoints.each do |codepoint|
113
+ delta += 1 if codepoint < n
114
+ next unless codepoint == n
115
+
116
+ q = delta
117
+ k = 36
118
+ loop do
119
+ threshold = if k <= bias
120
+ 1
121
+ elsif k >= bias + 26
122
+ 26
123
+ else
124
+ k - bias
125
+ end
126
+ break if q < threshold
127
+
128
+ output << punycode_digit(threshold + ((q - threshold) % (36 - threshold)))
129
+ q = (q - threshold) / (36 - threshold)
130
+ k += 36
131
+ end
132
+ output << punycode_digit(q)
133
+ bias = adapt_punycode_bias(delta, handled + 1, handled == basic_length)
134
+ delta = 0
135
+ handled += 1
136
+ end
137
+ delta += 1
138
+ n += 1
139
+ end
140
+ "xn--#{output}"
141
+ end
142
+
143
+ private def punycode_digit(value)
144
+ value < 26 ? (value + 97).chr : (value - 26 + 48).chr
145
+ end
146
+
147
+ private def adapt_punycode_bias(delta, points, first_time)
148
+ delta = first_time ? delta / 700 : delta / 2
149
+ delta += delta / points
150
+ k = 0
151
+ while delta > 455
152
+ delta /= 35
153
+ k += 36
154
+ end
155
+ k + ((36 * delta) / (delta + 38))
156
+ end
157
+
42
158
  private def validate_glob_pattern
43
159
  in_group = false
44
160
  escaped = false
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playwright
4
- VERSION = '1.61.0'
5
- COMPATIBLE_PLAYWRIGHT_VERSION = '1.61.1'
4
+ VERSION = '1.62.0'
5
+ COMPATIBLE_PLAYWRIGHT_VERSION = '1.62.1'
6
6
  end
data/lib/playwright.rb CHANGED
@@ -138,7 +138,7 @@ module Playwright
138
138
  end
139
139
  end
140
140
 
141
- # Connects to Playwright server, launched by `npx playwright launch-server --browser chromium` or `npx playwright run-server`
141
+ # Connects to Playwright server, launched by `playwright-core launch-server --browser chromium` or `playwright-core run-server`
142
142
  #
143
143
  # Playwright.connect_to_browser_server('ws://....') do |browser|
144
144
  # page = browser.new_page
@@ -186,7 +186,7 @@ module Playwright
186
186
  end
187
187
  end
188
188
 
189
- # Connects to Playwright server, launched by `npx playwright launch-server --browser _android` or `playwright._android.launchServer()`
189
+ # Connects to Playwright server, launched by `playwright-core launch-server --browser _android` or `playwright._android.launchServer()`
190
190
  #
191
191
  # Playwright.connect_to_android_server('ws://....') do |browser|
192
192
  # page = browser.new_page
@@ -290,12 +290,6 @@ module Playwright
290
290
  raise NotImplementedError.new('storage_state is not implemented yet.')
291
291
  end
292
292
 
293
- # -- inherited from EventEmitter --
294
- # @nodoc
295
- def off(event, callback)
296
- event_emitter_proxy.off(event, callback)
297
- end
298
-
299
293
  # -- inherited from EventEmitter --
300
294
  # @nodoc
301
295
  def once(event, callback)
@@ -308,6 +302,12 @@ module Playwright
308
302
  event_emitter_proxy.on(event, callback)
309
303
  end
310
304
 
305
+ # -- inherited from EventEmitter --
306
+ # @nodoc
307
+ def off(event, callback)
308
+ event_emitter_proxy.off(event, callback)
309
+ end
310
+
311
311
  private def event_emitter_proxy
312
312
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
313
313
  end
@@ -85,6 +85,15 @@ module Playwright
85
85
  wrap_impl(@impl.text)
86
86
  end
87
87
 
88
+ #
89
+ # Returns resource timing information for given response. For redirected requests, returns the information for the last
90
+ # request in the redirect chain. When the response is served [from the HAR file](../mock.md#replaying-from-har), timing
91
+ # information is not available and all the values are -1. Find more information at
92
+ # [Resource Timing API](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming).
93
+ def timing
94
+ wrap_impl(@impl.timing)
95
+ end
96
+
88
97
  #
89
98
  # Contains the URL of the response.
90
99
  def url
@@ -215,12 +215,6 @@ module Playwright
215
215
  wrap_impl(@impl.version)
216
216
  end
217
217
 
218
- # -- inherited from EventEmitter --
219
- # @nodoc
220
- def off(event, callback)
221
- event_emitter_proxy.off(event, callback)
222
- end
223
-
224
218
  # -- inherited from EventEmitter --
225
219
  # @nodoc
226
220
  def once(event, callback)
@@ -233,6 +227,12 @@ module Playwright
233
227
  event_emitter_proxy.on(event, callback)
234
228
  end
235
229
 
230
+ # -- inherited from EventEmitter --
231
+ # @nodoc
232
+ def off(event, callback)
233
+ event_emitter_proxy.off(event, callback)
234
+ end
235
+
236
236
  private def event_emitter_proxy
237
237
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
238
238
  end
@@ -423,13 +423,15 @@ 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 and IndexedDB snapshot.
427
- def storage_state(indexedDB: nil, path: nil)
428
- 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)))
429
429
  end
430
430
 
431
431
  #
432
- # 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.
433
435
  #
434
436
  # **Usage**
435
437
  #
@@ -511,20 +513,14 @@ module Playwright
511
513
  wrap_impl(@impl.pause)
512
514
  end
513
515
 
514
- # @nodoc
515
- def owner_page=(req)
516
- wrap_impl(@impl.owner_page=(unwrap_impl(req)))
517
- end
518
-
519
516
  # @nodoc
520
517
  def options=(req)
521
518
  wrap_impl(@impl.options=(unwrap_impl(req)))
522
519
  end
523
520
 
524
- # -- inherited from EventEmitter --
525
521
  # @nodoc
526
- def off(event, callback)
527
- event_emitter_proxy.off(event, callback)
522
+ def owner_page=(req)
523
+ wrap_impl(@impl.owner_page=(unwrap_impl(req)))
528
524
  end
529
525
 
530
526
  # -- inherited from EventEmitter --
@@ -539,6 +535,12 @@ module Playwright
539
535
  event_emitter_proxy.on(event, callback)
540
536
  end
541
537
 
538
+ # -- inherited from EventEmitter --
539
+ # @nodoc
540
+ def off(event, callback)
541
+ event_emitter_proxy.off(event, callback)
542
+ end
543
+
542
544
  private def event_emitter_proxy
543
545
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
544
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
@@ -184,12 +186,6 @@ module Playwright
184
186
  wrap_impl(@impl.name)
185
187
  end
186
188
 
187
- # -- inherited from EventEmitter --
188
- # @nodoc
189
- def off(event, callback)
190
- event_emitter_proxy.off(event, callback)
191
- end
192
-
193
189
  # -- inherited from EventEmitter --
194
190
  # @nodoc
195
191
  def once(event, callback)
@@ -202,6 +198,12 @@ module Playwright
202
198
  event_emitter_proxy.on(event, callback)
203
199
  end
204
200
 
201
+ # -- inherited from EventEmitter --
202
+ # @nodoc
203
+ def off(event, callback)
204
+ event_emitter_proxy.off(event, callback)
205
+ end
206
+
205
207
  private def event_emitter_proxy
206
208
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
207
209
  end
@@ -31,12 +31,6 @@ module Playwright
31
31
  wrap_impl(@impl.send_message(unwrap_impl(method), params: unwrap_impl(params)))
32
32
  end
33
33
 
34
- # -- inherited from EventEmitter --
35
- # @nodoc
36
- def off(event, callback)
37
- event_emitter_proxy.off(event, callback)
38
- end
39
-
40
34
  # -- inherited from EventEmitter --
41
35
  # @nodoc
42
36
  def once(event, callback)
@@ -49,6 +43,12 @@ module Playwright
49
43
  event_emitter_proxy.on(event, callback)
50
44
  end
51
45
 
46
+ # -- inherited from EventEmitter --
47
+ # @nodoc
48
+ def off(event, callback)
49
+ event_emitter_proxy.off(event, callback)
50
+ end
51
+
52
52
  private def event_emitter_proxy
53
53
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
54
54
  end
@@ -4,7 +4,7 @@ module Playwright
4
4
  # register passkeys and answer `navigator.credentials.create()` / `navigator.credentials.get()`
5
5
  # ceremonies in the page, without a real authenticator or hardware security key.
6
6
  #
7
- # There are two common ways to use it:
7
+ # There are three common ways to use it:
8
8
  #
9
9
  # **Usage: seed a known credential**
10
10
  #
@@ -26,7 +26,7 @@ module Playwright
26
26
  # # The page's navigator.credentials.get() is answered with the seeded passkey.
27
27
  # ```
28
28
  #
29
- # **Usage: capture a passkey, then reuse it**
29
+ # **Usage: capture a credential, then reuse it**
30
30
  #
31
31
  # ```python sync
32
32
  # # setup test: let the app register a passkey, then save it.
@@ -62,6 +62,10 @@ module Playwright
62
62
  # # navigator.credentials.get() resolves the captured passkey — already signed in.
63
63
  # ```
64
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
+ #
65
69
  # **Defaults**
66
70
  class Credentials < PlaywrightApi
67
71
 
@@ -68,12 +68,6 @@ module Playwright
68
68
  wrap_impl(@impl.accept_async(promptText: unwrap_impl(promptText)))
69
69
  end
70
70
 
71
- # -- inherited from EventEmitter --
72
- # @nodoc
73
- def off(event, callback)
74
- event_emitter_proxy.off(event, callback)
75
- end
76
-
77
71
  # -- inherited from EventEmitter --
78
72
  # @nodoc
79
73
  def once(event, callback)
@@ -86,6 +80,12 @@ module Playwright
86
80
  event_emitter_proxy.on(event, callback)
87
81
  end
88
82
 
83
+ # -- inherited from EventEmitter --
84
+ # @nodoc
85
+ def off(event, callback)
86
+ event_emitter_proxy.off(event, callback)
87
+ end
88
+
89
89
  private def event_emitter_proxy
90
90
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
91
91
  end
@@ -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
  #
@@ -574,12 +581,6 @@ module Playwright
574
581
  wrap_impl(@impl.wait_for_selector(unwrap_impl(selector), state: unwrap_impl(state), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
575
582
  end
576
583
 
577
- # -- inherited from EventEmitter --
578
- # @nodoc
579
- def off(event, callback)
580
- event_emitter_proxy.off(event, callback)
581
- end
582
-
583
584
  # -- inherited from EventEmitter --
584
585
  # @nodoc
585
586
  def once(event, callback)
@@ -592,6 +593,12 @@ module Playwright
592
593
  event_emitter_proxy.on(event, callback)
593
594
  end
594
595
 
596
+ # -- inherited from EventEmitter --
597
+ # @nodoc
598
+ def off(event, callback)
599
+ event_emitter_proxy.off(event, callback)
600
+ end
601
+
595
602
  private def event_emitter_proxy
596
603
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
597
604
  end
@@ -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
  #
@@ -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
  #
@@ -1046,16 +1054,6 @@ module Playwright
1046
1054
  wrap_impl(@impl.drop(unwrap_impl(selector), unwrap_impl(payload), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
1047
1055
  end
1048
1056
 
1049
- # @nodoc
1050
- def detached=(req)
1051
- wrap_impl(@impl.detached=(unwrap_impl(req)))
1052
- end
1053
-
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,10 +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 off(event, callback)
1072
- event_emitter_proxy.off(event, callback)
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)))
1073
1075
  end
1074
1076
 
1075
1077
  # -- inherited from EventEmitter --
@@ -1084,6 +1086,12 @@ module Playwright
1084
1086
  event_emitter_proxy.on(event, callback)
1085
1087
  end
1086
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