playwright-ruby-client 1.64.0 → 1.65.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 (37) hide show
  1. checksums.yaml +4 -4
  2. data/documentation/docs/api/browser.md +1 -1
  3. data/documentation/docs/api/browser_context.md +1 -1
  4. data/documentation/docs/api/cdp_session.md +1 -1
  5. data/documentation/docs/api/element_handle.md +2 -2
  6. data/documentation/docs/api/frame.md +4 -4
  7. data/documentation/docs/api/locator.md +3 -3
  8. data/documentation/docs/api/locator_assertions.md +2 -2
  9. data/documentation/docs/api/page.md +3 -3
  10. data/documentation/docs/article/guides/playwright_on_alpine_linux.md +1 -1
  11. data/lib/playwright/channel_owners/api_request_context.rb +10 -2
  12. data/lib/playwright/channel_owners/browser_context.rb +1 -1
  13. data/lib/playwright/channel_owners/cdp_session.rb +2 -2
  14. data/lib/playwright/channel_owners/tracing.rb +4 -4
  15. data/lib/playwright/version.rb +2 -2
  16. data/lib/playwright_api/api_request_context.rb +6 -6
  17. data/lib/playwright_api/browser.rb +8 -8
  18. data/lib/playwright_api/browser_context.rb +19 -19
  19. data/lib/playwright_api/browser_type.rb +6 -6
  20. data/lib/playwright_api/cdp_session.rb +8 -8
  21. data/lib/playwright_api/dialog.rb +6 -6
  22. data/lib/playwright_api/element_handle.rb +9 -9
  23. data/lib/playwright_api/frame.rb +18 -18
  24. data/lib/playwright_api/js_handle.rb +6 -6
  25. data/lib/playwright_api/locator.rb +9 -9
  26. data/lib/playwright_api/locator_assertions.rb +4 -4
  27. data/lib/playwright_api/page.rb +11 -11
  28. data/lib/playwright_api/playwright.rb +6 -6
  29. data/lib/playwright_api/request.rb +6 -6
  30. data/lib/playwright_api/response.rb +6 -6
  31. data/lib/playwright_api/route.rb +6 -6
  32. data/lib/playwright_api/tracing.rb +6 -6
  33. data/lib/playwright_api/web_socket.rb +6 -6
  34. data/lib/playwright_api/worker.rb +6 -6
  35. data/playwright.gemspec +1 -2
  36. data/sig/playwright.rbs +16 -16
  37. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d790738449c6398b19249ce438000db7f00a06a46b8db59307f2595d849781b
4
- data.tar.gz: 7010d04e7614128ad40443dae1f3745b0588915c5af4e1d8c81c21f962b9d4c5
3
+ metadata.gz: b11e5851185061f24e17c2d718c4bb66db6a5772836003d8efd64c3cb9548df3
4
+ data.tar.gz: d0dc1b9b7696b0b0a3cc1d213bb78ceb9e5b3da5fb40f437a850f9175f69cabf
5
5
  SHA512:
6
- metadata.gz: c1ff297b16ee61f37ece9c223280dc7ea31c1ecbe5aab4ec130348e6c0c74ca5ab86769328c2810daee6166bb4153a7a703d3bcac99472cdc43920089a60a37c
7
- data.tar.gz: 9a899659118c9b797a368c956538496fad57df2bb6b33d282af420095eecea459a323d2f046ba61d67e6c7d0bed9cb181fdcc4d2b7e57ac1d7bd8a05f0215e71
6
+ metadata.gz: 3a0b8801edcb143026df4605e3fc442c8130f12a62eeb255d6d1f32a550859a416d0ab0345bc9fd36b29c578d430a30845980836a63ae86712dbceee57790136
7
+ data.tar.gz: 833b7f7a7d02de66a3cbac98dd3c06b0a4aaf2f5e58da5461b0cfc1b7fda52933601c27eee970e6048f4534e3c84a00093b0aa3d09efd6860053ac6678842c17
@@ -207,7 +207,7 @@ Binds the browser to a named pipe or web socket, making it available for other c
207
207
  ## start_tracing
208
208
 
209
209
  ```
210
- def start_tracing(page: nil, categories: nil, path: nil, screenshots: nil)
210
+ def start_tracing(categories: nil, page: nil, path: nil, screenshots: nil)
211
211
  ```
212
212
 
213
213
 
@@ -44,7 +44,7 @@ browser_context.add_cookies([cookie_object1, cookie_object2])
44
44
  ## add_init_script
45
45
 
46
46
  ```
47
- def add_init_script(path: nil, script: nil)
47
+ def add_init_script(script: nil, path: nil)
48
48
  ```
49
49
 
50
50
 
@@ -38,7 +38,7 @@ send messages.
38
38
  ## send_message
39
39
 
40
40
  ```
41
- def send_message(method, params: nil)
41
+ def send_message(method, params: nil, timeout: nil)
42
42
  ```
43
43
 
44
44
 
@@ -493,11 +493,11 @@ See [scrolling](https://playwright.dev/python/docs/input#scrolling) for alternat
493
493
 
494
494
  ```
495
495
  def select_option(
496
+ value: nil,
496
497
  element: nil,
498
+ force: nil,
497
499
  index: nil,
498
- value: nil,
499
500
  label: nil,
500
- force: nil,
501
501
  noWaitAfter: nil,
502
502
  timeout: nil)
503
503
  ```
@@ -779,7 +779,7 @@ Returns whether the element is [enabled](https://playwright.dev/python/docs/acti
779
779
  ## hidden?
780
780
 
781
781
  ```
782
- def hidden?(selector, strict: nil, timeout: nil)
782
+ def hidden?(selector, strict: nil)
783
783
  ```
784
784
 
785
785
 
@@ -788,7 +788,7 @@ Returns whether the element is hidden, the opposite of [visible](https://playwri
788
788
  ## visible?
789
789
 
790
790
  ```
791
- def visible?(selector, strict: nil, timeout: nil)
791
+ def visible?(selector, strict: nil)
792
792
  ```
793
793
 
794
794
 
@@ -909,11 +909,11 @@ returns empty array.
909
909
  ```
910
910
  def select_option(
911
911
  selector,
912
+ value: nil,
912
913
  element: nil,
914
+ force: nil,
913
915
  index: nil,
914
- value: nil,
915
916
  label: nil,
916
- force: nil,
917
917
  noWaitAfter: nil,
918
918
  strict: nil,
919
919
  timeout: nil)
@@ -128,7 +128,7 @@ Below is the HTML markup and the respective ARIA snapshot:
128
128
  ```
129
129
 
130
130
  An AI-optimized snapshot, controlled by `mode`, is different from a default snapshot:
131
- 1. Includes element references `[ref=e2]`. 2. Does not wait for an element matching the locator, and throws when no elements match. 3. Includes snapshots of `<iframe>`s inside the target.
131
+ 1. Includes element references `[ref=e2]`. 2. Does not wait for an element matching the locator, and throws when no elements match. 3. Includes snapshots of `<iframe>`s inside the target. 4. Can omit names that repeat printed descendants, such as a heading containing a link. Names that identify dialogs, landmarks, groups, tables and table headers are retained.
132
132
 
133
133
  ## blur
134
134
 
@@ -1331,11 +1331,11 @@ See [scrolling](https://playwright.dev/python/docs/input#scrolling) for alternat
1331
1331
 
1332
1332
  ```
1333
1333
  def select_option(
1334
+ value: nil,
1334
1335
  element: nil,
1336
+ force: nil,
1335
1337
  index: nil,
1336
- value: nil,
1337
1338
  label: nil,
1338
- force: nil,
1339
1339
  noWaitAfter: nil,
1340
1340
  timeout: nil)
1341
1341
  ```
@@ -137,7 +137,7 @@ The opposite of [LocatorAssertions#to_contain_text](./locator_assertions#to_cont
137
137
  ## not_to_have_accessible_description
138
138
 
139
139
  ```ruby
140
- expect(locator).not_to have_accessible_description(name, ignoreCase: nil, timeout: nil)
140
+ expect(locator).not_to have_accessible_description(description, ignoreCase: nil, timeout: nil)
141
141
  ```
142
142
 
143
143
 
@@ -191,7 +191,7 @@ The opposite of [LocatorAssertions#to_have_count](./locator_assertions#to_have_c
191
191
  ## not_to_have_css
192
192
 
193
193
  ```ruby
194
- expect(locator).not_to have_css(name, value, timeout: nil)
194
+ expect(locator).not_to have_css(name, value, pseudo: nil, timeout: nil)
195
195
  ```
196
196
 
197
197
 
@@ -42,7 +42,7 @@ page.goto('https://example.com/') # => no print
42
42
  ## add_init_script
43
43
 
44
44
  ```
45
- def add_init_script(path: nil, script: nil)
45
+ def add_init_script(script: nil, path: nil)
46
46
  ```
47
47
 
48
48
 
@@ -1423,11 +1423,11 @@ Returns the buffer with the captured screenshot.
1423
1423
  ```
1424
1424
  def select_option(
1425
1425
  selector,
1426
+ value: nil,
1426
1427
  element: nil,
1428
+ force: nil,
1427
1429
  index: nil,
1428
- value: nil,
1429
1430
  label: nil,
1430
- force: nil,
1431
1431
  noWaitAfter: nil,
1432
1432
  strict: nil,
1433
1433
  timeout: nil)
@@ -83,7 +83,7 @@ If custom Docker image is preferred, build it as follows:
83
83
  FROM mcr.microsoft.com/playwright
84
84
 
85
85
  WORKDIR /root
86
- ARG PLAYWRIGHT_CORE_VERSION=1.64.0
86
+ ARG PLAYWRIGHT_CORE_VERSION=1.65.1
87
87
  RUN npm install "playwright-core@$PLAYWRIGHT_CORE_VERSION" && ./node_modules/.bin/playwright-core install
88
88
 
89
89
  ENV PORT 8888
@@ -147,10 +147,10 @@ module Playwright
147
147
  form_data = nil
148
148
  multipart_data = nil
149
149
  post_data_buffer = nil
150
- if data
150
+ if !data.nil?
151
151
  case data
152
152
  when String
153
- if headers_obj&.any? { |key, value| key.downcase == 'content-type' && value == 'application/json' }
153
+ if json_content_type?(headers_obj)
154
154
  json_data = json_parsable?(data) ? data : data.to_json
155
155
  else
156
156
  post_data_buffer = data
@@ -192,6 +192,14 @@ module Playwright
192
192
  APIResponseImpl.new(self, response)
193
193
  end
194
194
 
195
+ private def json_content_type?(headers)
196
+ return false unless headers
197
+
198
+ headers.any? do |key, value|
199
+ key.to_s.downcase == 'content-type' && value.to_s.split(';').first.to_s.strip.downcase == 'application/json'
200
+ end
201
+ end
202
+
195
203
  private def file_payload?(value)
196
204
  value.is_a?(Hash) &&
197
205
  %w(name mimeType buffer).all? { |key| value.has_key?(key) || value.has_key?(key.to_sym) }
@@ -89,7 +89,7 @@ module Playwright
89
89
  private def initialize_har_from_options(record_har_path:, record_har_content:, record_har_omit_content:, record_har_url_filter:, record_har_mode:)
90
90
  return unless record_har_path
91
91
 
92
- default_policy = record_har_path.end_with?('.zip') ? 'attach' : 'embed'
92
+ default_policy = record_har_path.match?(/\.zip\z/i) ? 'attach' : 'embed'
93
93
  content_policy = record_har_content || (record_har_omit_content ? 'omit' : default_policy)
94
94
  @tracing.send(:record_into_har, record_har_path, nil,
95
95
  url: record_har_url_filter,
@@ -8,8 +8,8 @@ module Playwright
8
8
  emit(params['method'], params['params'])
9
9
  end
10
10
 
11
- def send_message(method, params: {})
12
- @channel.send_message_to_server('send', method: method, params: params)
11
+ def send_message(method, params: {}, timeout: nil)
12
+ @channel.send_message_to_server('send', method: method, params: params, timeout: timeout || 0)
13
13
  end
14
14
 
15
15
  def detach
@@ -135,11 +135,11 @@ module Playwright
135
135
 
136
136
  def start_har(path, content: nil, mode: nil, urlFilter: nil, resourcesDir: nil)
137
137
  raise 'HAR recording has already been started' if @har_id
138
- if resourcesDir && path.end_with?('.zip')
138
+ if resourcesDir && path.match?(/\.zip\z/i)
139
139
  raise 'resourcesDir option is not compatible with a .zip har file'
140
140
  end
141
141
 
142
- default_content = path.end_with?('.zip') ? 'attach' : 'embed'
142
+ default_content = path.match?(/\.zip\z/i) ? 'attach' : 'embed'
143
143
  @har_id = record_into_har(path, nil,
144
144
  url: urlFilter,
145
145
  update_content: content || default_content,
@@ -162,7 +162,7 @@ module Playwright
162
162
  options = {
163
163
  content: update_content || 'attach',
164
164
  mode: update_mode || 'minimal',
165
- harPath: har.end_with?('.zip') ? nil : har,
165
+ harPath: har.match?(/\.zip\z/i) ? nil : har,
166
166
  resourcesDir: resources_dir,
167
167
  }.compact
168
168
 
@@ -188,7 +188,7 @@ module Playwright
188
188
  return unless har_params
189
189
 
190
190
  path = har_params[:path]
191
- is_zip = path.end_with?('.zip')
191
+ is_zip = path.match?(/\.zip\z/i)
192
192
  local_utils = @connection.local_utils
193
193
 
194
194
  if !@connection.remote?
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playwright
4
- VERSION = '1.64.0'
5
- COMPATIBLE_PLAYWRIGHT_VERSION = '1.64.0'
4
+ VERSION = '1.65.0'
5
+ COMPATIBLE_PLAYWRIGHT_VERSION = '1.65.1'
6
6
  end
@@ -330,12 +330,6 @@ module Playwright
330
330
  raise NotImplementedError.new('storage_state is not implemented yet.')
331
331
  end
332
332
 
333
- # -- inherited from EventEmitter --
334
- # @nodoc
335
- def off(event, callback)
336
- event_emitter_proxy.off(event, callback)
337
- end
338
-
339
333
  # -- inherited from EventEmitter --
340
334
  # @nodoc
341
335
  def once(event, callback)
@@ -348,6 +342,12 @@ module Playwright
348
342
  event_emitter_proxy.on(event, callback)
349
343
  end
350
344
 
345
+ # -- inherited from EventEmitter --
346
+ # @nodoc
347
+ def off(event, callback)
348
+ event_emitter_proxy.off(event, callback)
349
+ end
350
+
351
351
  private def event_emitter_proxy
352
352
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
353
353
  end
@@ -193,8 +193,8 @@ module Playwright
193
193
  # page.goto("https://www.google.com")
194
194
  # browser.stop_tracing()
195
195
  # ```
196
- def start_tracing(page: nil, categories: nil, path: nil, screenshots: nil)
197
- wrap_impl(@impl.start_tracing(page: unwrap_impl(page), categories: unwrap_impl(categories), path: unwrap_impl(path), screenshots: unwrap_impl(screenshots)))
196
+ def start_tracing(categories: nil, page: nil, path: nil, screenshots: nil)
197
+ wrap_impl(@impl.start_tracing(categories: unwrap_impl(categories), page: unwrap_impl(page), path: unwrap_impl(path), screenshots: unwrap_impl(screenshots)))
198
198
  end
199
199
 
200
200
  #
@@ -217,12 +217,6 @@ module Playwright
217
217
  wrap_impl(@impl.version)
218
218
  end
219
219
 
220
- # -- inherited from EventEmitter --
221
- # @nodoc
222
- def off(event, callback)
223
- event_emitter_proxy.off(event, callback)
224
- end
225
-
226
220
  # -- inherited from EventEmitter --
227
221
  # @nodoc
228
222
  def once(event, callback)
@@ -235,6 +229,12 @@ module Playwright
235
229
  event_emitter_proxy.on(event, callback)
236
230
  end
237
231
 
232
+ # -- inherited from EventEmitter --
233
+ # @nodoc
234
+ def off(event, callback)
235
+ event_emitter_proxy.off(event, callback)
236
+ end
237
+
238
238
  private def event_emitter_proxy
239
239
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
240
240
  end
@@ -80,8 +80,8 @@ module Playwright
80
80
  #
81
81
  # **NOTE**: The order of evaluation of multiple scripts installed via [`method: BrowserContext.addInitScript`] and
82
82
  # [`method: Page.addInitScript`] is not defined.
83
- def add_init_script(path: nil, script: nil)
84
- wrap_impl(@impl.add_init_script(path: unwrap_impl(path), script: unwrap_impl(script)))
83
+ def add_init_script(script: nil, path: nil)
84
+ wrap_impl(@impl.add_init_script(script: unwrap_impl(script), path: unwrap_impl(path)))
85
85
  end
86
86
 
87
87
  #
@@ -341,14 +341,14 @@ module Playwright
341
341
  # See `WebSocketRoute` for more details and examples.
342
342
  #
343
343
  # ```python sync
344
- # def message_handler(ws: WebSocketRoute, message: Union[str, bytes]):
344
+ # def message_handler(server: WebSocketRoute, message: Union[str, bytes]):
345
345
  # if message == "to-be-blocked":
346
346
  # return
347
- # ws.send(message)
347
+ # server.send(message)
348
348
  #
349
349
  # def handler(ws: WebSocketRoute):
350
- # ws.route_send(lambda message: message_handler(ws, message))
351
- # ws.connect()
350
+ # server = ws.connect_to_server()
351
+ # ws.on_message(lambda message: message_handler(server, message))
352
352
  #
353
353
  # context.route_web_socket("/ws", handler)
354
354
  # ```
@@ -498,16 +498,6 @@ 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
-
506
- # @nodoc
507
- def options=(req)
508
- wrap_impl(@impl.options=(unwrap_impl(req)))
509
- end
510
-
511
501
  # @nodoc
512
502
  def browser=(req)
513
503
  wrap_impl(@impl.browser=(unwrap_impl(req)))
@@ -523,10 +513,14 @@ module Playwright
523
513
  wrap_impl(@impl.pause)
524
514
  end
525
515
 
526
- # -- inherited from EventEmitter --
527
516
  # @nodoc
528
- def off(event, callback)
529
- event_emitter_proxy.off(event, callback)
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)))
530
524
  end
531
525
 
532
526
  # -- inherited from EventEmitter --
@@ -541,6 +535,12 @@ module Playwright
541
535
  event_emitter_proxy.on(event, callback)
542
536
  end
543
537
 
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
@@ -187,12 +187,6 @@ module Playwright
187
187
  wrap_impl(@impl.name)
188
188
  end
189
189
 
190
- # -- inherited from EventEmitter --
191
- # @nodoc
192
- def off(event, callback)
193
- event_emitter_proxy.off(event, callback)
194
- end
195
-
196
190
  # -- inherited from EventEmitter --
197
191
  # @nodoc
198
192
  def once(event, callback)
@@ -205,6 +199,12 @@ module Playwright
205
199
  event_emitter_proxy.on(event, callback)
206
200
  end
207
201
 
202
+ # -- inherited from EventEmitter --
203
+ # @nodoc
204
+ def off(event, callback)
205
+ event_emitter_proxy.off(event, callback)
206
+ end
207
+
208
208
  private def event_emitter_proxy
209
209
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
210
210
  end
@@ -27,14 +27,8 @@ module Playwright
27
27
  wrap_impl(@impl.detach)
28
28
  end
29
29
 
30
- def send_message(method, params: nil)
31
- wrap_impl(@impl.send_message(unwrap_impl(method), params: unwrap_impl(params)))
32
- end
33
-
34
- # -- inherited from EventEmitter --
35
- # @nodoc
36
- def off(event, callback)
37
- event_emitter_proxy.off(event, callback)
30
+ def send_message(method, params: nil, timeout: nil)
31
+ wrap_impl(@impl.send_message(unwrap_impl(method), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
38
32
  end
39
33
 
40
34
  # -- inherited from EventEmitter --
@@ -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
@@ -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
@@ -424,14 +424,14 @@ module Playwright
424
424
  # handle.select_option(value=["red", "green", "blue"])
425
425
  # ```
426
426
  def select_option(
427
+ value: nil,
427
428
  element: nil,
429
+ force: nil,
428
430
  index: nil,
429
- value: nil,
430
431
  label: nil,
431
- force: nil,
432
432
  noWaitAfter: nil,
433
433
  timeout: nil)
434
- wrap_impl(@impl.select_option(element: unwrap_impl(element), index: unwrap_impl(index), value: unwrap_impl(value), label: unwrap_impl(label), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout)))
434
+ wrap_impl(@impl.select_option(value: unwrap_impl(value), element: unwrap_impl(element), force: unwrap_impl(force), index: unwrap_impl(index), label: unwrap_impl(label), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout)))
435
435
  end
436
436
 
437
437
  #
@@ -581,12 +581,6 @@ module Playwright
581
581
  wrap_impl(@impl.wait_for_selector(unwrap_impl(selector), state: unwrap_impl(state), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
582
582
  end
583
583
 
584
- # -- inherited from EventEmitter --
585
- # @nodoc
586
- def off(event, callback)
587
- event_emitter_proxy.off(event, callback)
588
- end
589
-
590
584
  # -- inherited from EventEmitter --
591
585
  # @nodoc
592
586
  def once(event, callback)
@@ -599,6 +593,12 @@ module Playwright
599
593
  event_emitter_proxy.on(event, callback)
600
594
  end
601
595
 
596
+ # -- inherited from EventEmitter --
597
+ # @nodoc
598
+ def off(event, callback)
599
+ event_emitter_proxy.off(event, callback)
600
+ end
601
+
602
602
  private def event_emitter_proxy
603
603
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
604
604
  end
@@ -672,14 +672,14 @@ module Playwright
672
672
 
673
673
  #
674
674
  # Returns whether the element is hidden, the opposite of [visible](../actionability.md#visible). `selector` that does not match any elements is considered hidden.
675
- def hidden?(selector, strict: nil, timeout: nil)
676
- wrap_impl(@impl.hidden?(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
675
+ def hidden?(selector, strict: nil)
676
+ wrap_impl(@impl.hidden?(unwrap_impl(selector), strict: unwrap_impl(strict)))
677
677
  end
678
678
 
679
679
  #
680
680
  # Returns whether the element is [visible](../actionability.md#visible). `selector` that does not match any elements is considered not visible.
681
- def visible?(selector, strict: nil, timeout: nil)
682
- wrap_impl(@impl.visible?(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
681
+ def visible?(selector, strict: nil)
682
+ wrap_impl(@impl.visible?(unwrap_impl(selector), strict: unwrap_impl(strict)))
683
683
  end
684
684
 
685
685
  #
@@ -792,15 +792,15 @@ module Playwright
792
792
  # ```
793
793
  def select_option(
794
794
  selector,
795
+ value: nil,
795
796
  element: nil,
797
+ force: nil,
796
798
  index: nil,
797
- value: nil,
798
799
  label: nil,
799
- force: nil,
800
800
  noWaitAfter: nil,
801
801
  strict: nil,
802
802
  timeout: nil)
803
- wrap_impl(@impl.select_option(unwrap_impl(selector), element: unwrap_impl(element), index: unwrap_impl(index), value: unwrap_impl(value), label: unwrap_impl(label), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
803
+ wrap_impl(@impl.select_option(unwrap_impl(selector), value: unwrap_impl(value), element: unwrap_impl(element), force: unwrap_impl(force), index: unwrap_impl(index), label: unwrap_impl(label), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
804
804
  end
805
805
 
806
806
  #
@@ -1071,6 +1071,11 @@ module Playwright
1071
1071
  wrap_impl(@impl.drop(unwrap_impl(selector), unwrap_impl(payload), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
1072
1072
  end
1073
1073
 
1074
+ # @nodoc
1075
+ def expect(selector, expression, options, title)
1076
+ wrap_impl(@impl.expect(unwrap_impl(selector), unwrap_impl(expression), unwrap_impl(options), unwrap_impl(title)))
1077
+ end
1078
+
1074
1079
  # @nodoc
1075
1080
  def detached=(req)
1076
1081
  wrap_impl(@impl.detached=(unwrap_impl(req)))
@@ -1086,17 +1091,6 @@ module Playwright
1086
1091
  wrap_impl(@impl.hide_highlight(unwrap_impl(selector)))
1087
1092
  end
1088
1093
 
1089
- # @nodoc
1090
- def expect(selector, expression, options, title)
1091
- wrap_impl(@impl.expect(unwrap_impl(selector), unwrap_impl(expression), unwrap_impl(options), unwrap_impl(title)))
1092
- end
1093
-
1094
- # -- inherited from EventEmitter --
1095
- # @nodoc
1096
- def off(event, callback)
1097
- event_emitter_proxy.off(event, callback)
1098
- end
1099
-
1100
1094
  # -- inherited from EventEmitter --
1101
1095
  # @nodoc
1102
1096
  def once(event, callback)
@@ -1109,6 +1103,12 @@ module Playwright
1109
1103
  event_emitter_proxy.on(event, callback)
1110
1104
  end
1111
1105
 
1106
+ # -- inherited from EventEmitter --
1107
+ # @nodoc
1108
+ def off(event, callback)
1109
+ event_emitter_proxy.off(event, callback)
1110
+ end
1111
+
1112
1112
  private def event_emitter_proxy
1113
1113
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
1114
1114
  end
@@ -98,12 +98,6 @@ module Playwright
98
98
  wrap_impl(@impl.to_s)
99
99
  end
100
100
 
101
- # -- inherited from EventEmitter --
102
- # @nodoc
103
- def off(event, callback)
104
- event_emitter_proxy.off(event, callback)
105
- end
106
-
107
101
  # -- inherited from EventEmitter --
108
102
  # @nodoc
109
103
  def once(event, callback)
@@ -116,6 +110,12 @@ module Playwright
116
110
  event_emitter_proxy.on(event, callback)
117
111
  end
118
112
 
113
+ # -- inherited from EventEmitter --
114
+ # @nodoc
115
+ def off(event, callback)
116
+ event_emitter_proxy.off(event, callback)
117
+ end
118
+
119
119
  private def event_emitter_proxy
120
120
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
121
121
  end
@@ -105,7 +105,7 @@ module Playwright
105
105
  # ```
106
106
  #
107
107
  # An AI-optimized snapshot, controlled by `mode`, is different from a default snapshot:
108
- # 1. Includes element references `[ref=e2]`. 2. Does not wait for an element matching the locator, and throws when no elements match. 3. Includes snapshots of `<iframe>`s inside the target.
108
+ # 1. Includes element references `[ref=e2]`. 2. Does not wait for an element matching the locator, and throws when no elements match. 3. Includes snapshots of `<iframe>`s inside the target. 4. Can omit names that repeat printed descendants, such as a heading containing a link. Names that identify dialogs, landmarks, groups, tables and table headers are retained.
109
109
  def aria_snapshot(boxes: nil, depth: nil, mode: nil, timeout: nil)
110
110
  wrap_impl(@impl.aria_snapshot(boxes: unwrap_impl(boxes), depth: unwrap_impl(depth), mode: unwrap_impl(mode), timeout: unwrap_impl(timeout)))
111
111
  end
@@ -1167,14 +1167,14 @@ module Playwright
1167
1167
  # element.select_option(value=["red", "green", "blue"])
1168
1168
  # ```
1169
1169
  def select_option(
1170
+ value: nil,
1170
1171
  element: nil,
1172
+ force: nil,
1171
1173
  index: nil,
1172
- value: nil,
1173
1174
  label: nil,
1174
- force: nil,
1175
1175
  noWaitAfter: nil,
1176
1176
  timeout: nil)
1177
- wrap_impl(@impl.select_option(element: unwrap_impl(element), index: unwrap_impl(index), value: unwrap_impl(value), label: unwrap_impl(label), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout)))
1177
+ wrap_impl(@impl.select_option(value: unwrap_impl(value), element: unwrap_impl(element), force: unwrap_impl(force), index: unwrap_impl(index), label: unwrap_impl(label), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout)))
1178
1178
  end
1179
1179
 
1180
1180
  #
@@ -1411,6 +1411,11 @@ module Playwright
1411
1411
  wrap_impl(@impl.within(unwrap_impl(locator)))
1412
1412
  end
1413
1413
 
1414
+ # @nodoc
1415
+ def expect(expression, options, title)
1416
+ wrap_impl(@impl.expect(unwrap_impl(expression), unwrap_impl(options), unwrap_impl(title)))
1417
+ end
1418
+
1414
1419
  # @nodoc
1415
1420
  def _assertions(timeout, is_not, message)
1416
1421
  wrap_impl(@impl._assertions(unwrap_impl(timeout), unwrap_impl(is_not), unwrap_impl(message)))
@@ -1421,11 +1426,6 @@ module Playwright
1421
1426
  wrap_impl(@impl.resolve_selector)
1422
1427
  end
1423
1428
 
1424
- # @nodoc
1425
- def expect(expression, options, title)
1426
- wrap_impl(@impl.expect(unwrap_impl(expression), unwrap_impl(options), unwrap_impl(title)))
1427
- end
1428
-
1429
1429
  # @nodoc
1430
1430
  def to_s
1431
1431
  wrap_impl(@impl.to_s)
@@ -86,8 +86,8 @@ module Playwright
86
86
 
87
87
  #
88
88
  # The opposite of [`method: LocatorAssertions.toHaveAccessibleDescription`].
89
- def not_to_have_accessible_description(name, ignoreCase: nil, timeout: nil)
90
- wrap_impl(@impl.not_to_have_accessible_description(unwrap_impl(name), ignoreCase: unwrap_impl(ignoreCase), timeout: unwrap_impl(timeout)))
89
+ def not_to_have_accessible_description(description, ignoreCase: nil, timeout: nil)
90
+ wrap_impl(@impl.not_to_have_accessible_description(unwrap_impl(description), ignoreCase: unwrap_impl(ignoreCase), timeout: unwrap_impl(timeout)))
91
91
  end
92
92
 
93
93
  #
@@ -122,8 +122,8 @@ module Playwright
122
122
 
123
123
  #
124
124
  # The opposite of [`method: LocatorAssertions.toHaveCSS`].
125
- def not_to_have_css(name, value, timeout: nil)
126
- wrap_impl(@impl.not_to_have_css(unwrap_impl(name), unwrap_impl(value), timeout: unwrap_impl(timeout)))
125
+ def not_to_have_css(name, value, pseudo: nil, timeout: nil)
126
+ wrap_impl(@impl.not_to_have_css(unwrap_impl(name), unwrap_impl(value), pseudo: unwrap_impl(pseudo), timeout: unwrap_impl(timeout)))
127
127
  end
128
128
 
129
129
  #
@@ -115,8 +115,8 @@ module Playwright
115
115
  #
116
116
  # **NOTE**: The order of evaluation of multiple scripts installed via [`method: BrowserContext.addInitScript`] and
117
117
  # [`method: Page.addInitScript`] is not defined.
118
- def add_init_script(path: nil, script: nil)
119
- wrap_impl(@impl.add_init_script(path: unwrap_impl(path), script: unwrap_impl(script)))
118
+ def add_init_script(script: nil, path: nil)
119
+ wrap_impl(@impl.add_init_script(script: unwrap_impl(script), path: unwrap_impl(path)))
120
120
  end
121
121
 
122
122
  #
@@ -1430,15 +1430,15 @@ module Playwright
1430
1430
  # ```
1431
1431
  def select_option(
1432
1432
  selector,
1433
+ value: nil,
1433
1434
  element: nil,
1435
+ force: nil,
1434
1436
  index: nil,
1435
- value: nil,
1436
1437
  label: nil,
1437
- force: nil,
1438
1438
  noWaitAfter: nil,
1439
1439
  strict: nil,
1440
1440
  timeout: nil)
1441
- wrap_impl(@impl.select_option(unwrap_impl(selector), element: unwrap_impl(element), index: unwrap_impl(index), value: unwrap_impl(value), label: unwrap_impl(label), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
1441
+ wrap_impl(@impl.select_option(unwrap_impl(selector), value: unwrap_impl(value), element: unwrap_impl(element), force: unwrap_impl(force), index: unwrap_impl(index), label: unwrap_impl(label), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
1442
1442
  end
1443
1443
 
1444
1444
  #
@@ -1974,12 +1974,6 @@ module Playwright
1974
1974
  wrap_impl(@impl.owned_context=(unwrap_impl(req)))
1975
1975
  end
1976
1976
 
1977
- # -- inherited from EventEmitter --
1978
- # @nodoc
1979
- def off(event, callback)
1980
- event_emitter_proxy.off(event, callback)
1981
- end
1982
-
1983
1977
  # -- inherited from EventEmitter --
1984
1978
  # @nodoc
1985
1979
  def once(event, callback)
@@ -1992,6 +1986,12 @@ module Playwright
1992
1986
  event_emitter_proxy.on(event, callback)
1993
1987
  end
1994
1988
 
1989
+ # -- inherited from EventEmitter --
1990
+ # @nodoc
1991
+ def off(event, callback)
1992
+ event_emitter_proxy.off(event, callback)
1993
+ end
1994
+
1995
1995
  private def event_emitter_proxy
1996
1996
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
1997
1997
  end
@@ -103,12 +103,6 @@ module Playwright
103
103
  wrap_impl(@impl.electron)
104
104
  end
105
105
 
106
- # -- inherited from EventEmitter --
107
- # @nodoc
108
- def off(event, callback)
109
- event_emitter_proxy.off(event, callback)
110
- end
111
-
112
106
  # -- inherited from EventEmitter --
113
107
  # @nodoc
114
108
  def once(event, callback)
@@ -121,6 +115,12 @@ module Playwright
121
115
  event_emitter_proxy.on(event, callback)
122
116
  end
123
117
 
118
+ # -- inherited from EventEmitter --
119
+ # @nodoc
120
+ def off(event, callback)
121
+ event_emitter_proxy.off(event, callback)
122
+ end
123
+
124
124
  private def event_emitter_proxy
125
125
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
126
126
  end
@@ -227,12 +227,6 @@ module Playwright
227
227
  wrap_impl(@impl.header_values(unwrap_impl(name)))
228
228
  end
229
229
 
230
- # -- inherited from EventEmitter --
231
- # @nodoc
232
- def off(event, callback)
233
- event_emitter_proxy.off(event, callback)
234
- end
235
-
236
230
  # -- inherited from EventEmitter --
237
231
  # @nodoc
238
232
  def once(event, callback)
@@ -245,6 +239,12 @@ module Playwright
245
239
  event_emitter_proxy.on(event, callback)
246
240
  end
247
241
 
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
@@ -134,12 +134,6 @@ module Playwright
134
134
  wrap_impl(@impl.from_service_worker?)
135
135
  end
136
136
 
137
- # -- inherited from EventEmitter --
138
- # @nodoc
139
- def off(event, callback)
140
- event_emitter_proxy.off(event, callback)
141
- end
142
-
143
137
  # -- inherited from EventEmitter --
144
138
  # @nodoc
145
139
  def once(event, callback)
@@ -152,6 +146,12 @@ module Playwright
152
146
  event_emitter_proxy.on(event, callback)
153
147
  end
154
148
 
149
+ # -- inherited from EventEmitter --
150
+ # @nodoc
151
+ def off(event, callback)
152
+ event_emitter_proxy.off(event, callback)
153
+ end
154
+
155
155
  private def event_emitter_proxy
156
156
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
157
157
  end
@@ -177,12 +177,6 @@ module Playwright
177
177
  wrap_impl(@impl.redirect_navigation_request(unwrap_impl(url)))
178
178
  end
179
179
 
180
- # -- inherited from EventEmitter --
181
- # @nodoc
182
- def off(event, callback)
183
- event_emitter_proxy.off(event, callback)
184
- end
185
-
186
180
  # -- inherited from EventEmitter --
187
181
  # @nodoc
188
182
  def once(event, callback)
@@ -195,6 +189,12 @@ module Playwright
195
189
  event_emitter_proxy.on(event, callback)
196
190
  end
197
191
 
192
+ # -- inherited from EventEmitter --
193
+ # @nodoc
194
+ def off(event, callback)
195
+ event_emitter_proxy.off(event, callback)
196
+ end
197
+
198
198
  private def event_emitter_proxy
199
199
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
200
200
  end
@@ -129,12 +129,6 @@ module Playwright
129
129
  wrap_impl(@impl.stop_har)
130
130
  end
131
131
 
132
- # -- inherited from EventEmitter --
133
- # @nodoc
134
- def off(event, callback)
135
- event_emitter_proxy.off(event, callback)
136
- end
137
-
138
132
  # -- inherited from EventEmitter --
139
133
  # @nodoc
140
134
  def once(event, callback)
@@ -147,6 +141,12 @@ module Playwright
147
141
  event_emitter_proxy.on(event, callback)
148
142
  end
149
143
 
144
+ # -- inherited from EventEmitter --
145
+ # @nodoc
146
+ def off(event, callback)
147
+ event_emitter_proxy.off(event, callback)
148
+ end
149
+
150
150
  private def event_emitter_proxy
151
151
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
152
152
  end
@@ -34,12 +34,6 @@ module Playwright
34
34
  wrap_impl(@impl.wait_for_event(unwrap_impl(event), predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
35
35
  end
36
36
 
37
- # -- inherited from EventEmitter --
38
- # @nodoc
39
- def off(event, callback)
40
- event_emitter_proxy.off(event, callback)
41
- end
42
-
43
37
  # -- inherited from EventEmitter --
44
38
  # @nodoc
45
39
  def once(event, callback)
@@ -52,6 +46,12 @@ module Playwright
52
46
  event_emitter_proxy.on(event, callback)
53
47
  end
54
48
 
49
+ # -- inherited from EventEmitter --
50
+ # @nodoc
51
+ def off(event, callback)
52
+ event_emitter_proxy.off(event, callback)
53
+ end
54
+
55
55
  private def event_emitter_proxy
56
56
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
57
57
  end
@@ -73,12 +73,6 @@ module Playwright
73
73
  wrap_impl(@impl.page=(unwrap_impl(req)))
74
74
  end
75
75
 
76
- # -- inherited from EventEmitter --
77
- # @nodoc
78
- def off(event, callback)
79
- event_emitter_proxy.off(event, callback)
80
- end
81
-
82
76
  # -- inherited from EventEmitter --
83
77
  # @nodoc
84
78
  def once(event, callback)
@@ -91,6 +85,12 @@ module Playwright
91
85
  event_emitter_proxy.on(event, callback)
92
86
  end
93
87
 
88
+ # -- inherited from EventEmitter --
89
+ # @nodoc
90
+ def off(event, callback)
91
+ event_emitter_proxy.off(event, callback)
92
+ end
93
+
94
94
  private def event_emitter_proxy
95
95
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
96
96
  end
data/playwright.gemspec CHANGED
@@ -27,8 +27,7 @@ Gem::Specification.new do |spec|
27
27
  f.include?(".circleci") ||
28
28
  f.start_with?("development/") ||
29
29
  f == "AGENTS.md" ||
30
- f == "CLAUDE.md" ||
31
- f.match(%r{\ACLAUDE/.*\.md\z})
30
+ f.match(%r{\AAGENTS/.*\.md\z})
32
31
  end
33
32
  end + `find lib/playwright_api -name *.rb -type f`.split("\n") + `find sig -name *.rbs -type f`.split("\n")
34
33
  spec.bindir = 'exe'
data/sig/playwright.rbs CHANGED
@@ -122,7 +122,7 @@ module Playwright
122
122
  def query_selector_all: (String selector) -> Array[untyped]
123
123
  def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?style: String, ?timeout: Float, ?type: ("png" | "jpeg" | "webp")) -> String
124
124
  def scroll_into_view_if_needed: (?timeout: Float) -> void
125
- def select_option: (?element: (ElementHandle | Array[untyped]), ?index: (Integer | Array[untyped]), ?value: (String | Array[untyped]), ?label: (String | Array[untyped]), ?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> Array[untyped]
125
+ def select_option: (?value: (String | Array[untyped]), ?element: (ElementHandle | Array[untyped]), ?force: bool, ?index: (Integer | Array[untyped]), ?label: (String | Array[untyped]), ?noWaitAfter: bool, ?timeout: Float) -> Array[untyped]
126
126
  def select_text: (?force: bool, ?timeout: Float) -> void
127
127
  def set_checked: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
128
128
  def checked=: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
@@ -181,8 +181,8 @@ module Playwright
181
181
  def disabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
182
182
  def editable?: (String selector, ?strict: bool, ?timeout: Float) -> bool
183
183
  def enabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
184
- def hidden?: (String selector, ?strict: bool, ?timeout: Float) -> bool
185
- def visible?: (String selector, ?strict: bool, ?timeout: Float) -> bool
184
+ def hidden?: (String selector, ?strict: bool) -> bool
185
+ def visible?: (String selector, ?strict: bool) -> bool
186
186
  def locator: (String selector, ?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
187
187
  def name: -> String
188
188
  def page: -> Page
@@ -190,7 +190,7 @@ module Playwright
190
190
  def press: (String selector, String key, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
191
191
  def query_selector: (String selector, ?strict: bool) -> (nil | ElementHandle)
192
192
  def query_selector_all: (String selector) -> Array[untyped]
193
- def select_option: (String selector, ?element: (ElementHandle | Array[untyped]), ?index: (Integer | Array[untyped]), ?value: (String | Array[untyped]), ?label: (String | Array[untyped]), ?force: bool, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> Array[untyped]
193
+ def select_option: (String selector, ?value: (String | Array[untyped]), ?element: (ElementHandle | Array[untyped]), ?force: bool, ?index: (Integer | Array[untyped]), ?label: (String | Array[untyped]), ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> Array[untyped]
194
194
  def set_checked: (String selector, bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
195
195
  def set_content: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
196
196
  def content=: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
@@ -267,7 +267,7 @@ module Playwright
267
267
  end
268
268
 
269
269
  class Page
270
- def add_init_script: (?path: (String | File), ?script: String) -> untyped
270
+ def add_init_script: (?script: String, ?path: (String | File)) -> untyped
271
271
  def add_script_tag: (?content: String, ?path: (String | File), ?type: String, ?url: String) -> ElementHandle
272
272
  def add_style_tag: (?content: String, ?path: (String | File), ?url: String) -> ElementHandle
273
273
  def bring_to_front: -> void
@@ -332,10 +332,10 @@ module Playwright
332
332
  def query_selector_all: (String selector) -> Array[untyped]
333
333
  def requests: -> Array[untyped]
334
334
  def reload: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
335
- def route: ((String | Regexp | function) url, function handler, ?times: Integer) -> untyped
335
+ def route: ((String | Regexp | function) url, (function | function) handler, ?times: Integer) -> untyped
336
336
  def route_from_har: ((String | File) har, ?notFound: ("abort" | "fallback"), ?update: bool, ?updateContent: ("embed" | "attach"), ?updateMode: ("full" | "minimal"), ?url: (String | Regexp)) -> void
337
337
  def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?clip: Hash[untyped, untyped], ?fullPage: bool, ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?style: String, ?timeout: Float, ?type: ("png" | "jpeg" | "webp")) -> String
338
- def select_option: (String selector, ?element: (ElementHandle | Array[untyped]), ?index: (Integer | Array[untyped]), ?value: (String | Array[untyped]), ?label: (String | Array[untyped]), ?force: bool, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> Array[untyped]
338
+ def select_option: (String selector, ?value: (String | Array[untyped]), ?element: (ElementHandle | Array[untyped]), ?force: bool, ?index: (Integer | Array[untyped]), ?label: (String | Array[untyped]), ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> Array[untyped]
339
339
  def set_checked: (String selector, bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
340
340
  def set_content: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
341
341
  def content=: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
@@ -355,7 +355,7 @@ module Playwright
355
355
  def type: (String selector, String text, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
356
356
  def uncheck: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
357
357
  def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
358
- def unroute: ((String | Regexp | function) url, ?handler: function) -> void
358
+ def unroute: ((String | Regexp | function) url, ?handler: (function | function)) -> void
359
359
  def url: -> String
360
360
  def video: -> (nil | untyped)
361
361
  def viewport_size: -> (nil | Hash[untyped, untyped])
@@ -390,7 +390,7 @@ module Playwright
390
390
 
391
391
  class BrowserContext
392
392
  def add_cookies: (Array[untyped] cookies) -> void
393
- def add_init_script: (?path: (String | File), ?script: String) -> untyped
393
+ def add_init_script: (?script: String, ?path: (String | File)) -> untyped
394
394
  def background_pages: -> Array[untyped]
395
395
  def browser: -> (nil | Browser)
396
396
  def clear_cookies: (?domain: (String | Regexp), ?name: (String | Regexp), ?path: (String | Regexp)) -> void
@@ -404,7 +404,7 @@ module Playwright
404
404
  def new_cdp_session: ((Page | Frame) page) -> CDPSession
405
405
  def new_page: () ?{ (Page) -> untyped } -> Page
406
406
  def pages: -> Array[untyped]
407
- def route: ((String | Regexp | function) url, function handler, ?times: Integer) -> untyped
407
+ def route: ((String | Regexp | function) url, (function | function) handler, ?times: Integer) -> untyped
408
408
  def route_from_har: ((String | File) har, ?notFound: ("abort" | "fallback"), ?update: bool, ?updateContent: ("embed" | "attach"), ?updateMode: ("full" | "minimal"), ?url: (String | Regexp)) -> void
409
409
  def service_workers: -> Array[untyped]
410
410
  def set_default_navigation_timeout: (Float timeout) -> void
@@ -421,7 +421,7 @@ module Playwright
421
421
  def set_storage_state: (((String | File) | Hash[untyped, untyped]) storageState) -> void
422
422
  def storage_state=: (((String | File) | Hash[untyped, untyped]) storageState) -> void
423
423
  def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
424
- def unroute: ((String | Regexp | function) url, ?handler: function) -> void
424
+ def unroute: ((String | Regexp | function) url, ?handler: (function | function)) -> void
425
425
  def expect_console_message: (?predicate: function, ?timeout: Float) { () -> void } -> ConsoleMessage
426
426
  def expect_event: (String event, ?predicate: function, ?timeout: Float) { () -> void } -> untyped
427
427
  def expect_page: (?predicate: function, ?timeout: Float) { () -> void } -> Page
@@ -434,7 +434,7 @@ module Playwright
434
434
 
435
435
  class CDPSession
436
436
  def detach: -> void
437
- def send_message: (String method, ?params: Hash[untyped, untyped]) -> Hash[untyped, untyped]
437
+ def send_message: (String method, ?params: Hash[untyped, untyped], ?timeout: Float) -> Hash[untyped, untyped]
438
438
  end
439
439
 
440
440
  class Browser
@@ -446,7 +446,7 @@ module Playwright
446
446
  def new_context: (?acceptDownloads: bool, ?baseURL: String, ?bypassCSP: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: (Hash[untyped, untyped] | Array[untyped]), ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_fps: Integer, ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?storageState: ((String | File) | Hash[untyped, untyped]), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (BrowserContext) -> untyped } -> BrowserContext
447
447
  def new_page: (?acceptDownloads: bool, ?baseURL: String, ?bypassCSP: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: (Hash[untyped, untyped] | Array[untyped]), ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_fps: Integer, ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?storageState: ((String | File) | Hash[untyped, untyped]), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (Page) -> untyped } -> Page
448
448
  def bind: (String title, ?host: String, ?port: Integer, ?workspaceDir: String) -> Hash[untyped, untyped]
449
- def start_tracing: (?page: Page, ?categories: Array[untyped], ?path: (String | File), ?screenshots: bool) -> void
449
+ def start_tracing: (?categories: Array[untyped], ?page: Page, ?path: (String | File), ?screenshots: bool) -> void
450
450
  def stop_tracing: -> String
451
451
  def unbind: -> void
452
452
  def version: -> String
@@ -542,7 +542,7 @@ module Playwright
542
542
  def press_sequentially: (String text, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
543
543
  def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?style: String, ?timeout: Float, ?type: ("png" | "jpeg" | "webp")) -> String
544
544
  def scroll_into_view_if_needed: (?timeout: Float) -> void
545
- def select_option: (?element: (ElementHandle | Array[untyped]), ?index: (Integer | Array[untyped]), ?value: (String | Array[untyped]), ?label: (String | Array[untyped]), ?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> Array[untyped]
545
+ def select_option: (?value: (String | Array[untyped]), ?element: (ElementHandle | Array[untyped]), ?force: bool, ?index: (Integer | Array[untyped]), ?label: (String | Array[untyped]), ?noWaitAfter: bool, ?timeout: Float) -> Array[untyped]
546
546
  def select_text: (?force: bool, ?timeout: Float) -> void
547
547
  def set_checked: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
548
548
  def checked=: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
@@ -624,13 +624,13 @@ module Playwright
624
624
  def not_to_be_visible: (?timeout: Float, ?visible: bool) -> void
625
625
  def not_to_contain_class: ((String | Array[untyped]) expected, ?timeout: Float) -> void
626
626
  def not_to_contain_text: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?ignoreCase: bool, ?timeout: Float, ?useInnerText: bool) -> void
627
- def not_to_have_accessible_description: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
627
+ def not_to_have_accessible_description: ((String | Regexp) description, ?ignoreCase: bool, ?timeout: Float) -> void
628
628
  def not_to_have_accessible_error_message: ((String | Regexp) errorMessage, ?ignoreCase: bool, ?timeout: Float) -> void
629
629
  def not_to_have_accessible_name: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
630
630
  def not_to_have_attribute: (String name, ?value: (String | Regexp), ?ignoreCase: bool, ?timeout: Float) -> void
631
631
  def not_to_have_class: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?timeout: Float) -> void
632
632
  def not_to_have_count: (Integer count, ?timeout: Float) -> void
633
- def not_to_have_css: (String name, (String | Regexp) value, ?timeout: Float) -> void
633
+ def not_to_have_css: (String name, (String | Regexp) value, ?pseudo: ("before" | "after"), ?timeout: Float) -> void
634
634
  def not_to_have_id: ((String | Regexp) id, ?timeout: Float) -> void
635
635
  def not_to_have_js_property: (String name, untyped value, ?timeout: Float) -> void
636
636
  def not_to_have_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?timeout: Float) -> void
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playwright-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.64.0
4
+ version: 1.65.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
@@ -446,5 +446,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
446
446
  requirements: []
447
447
  rubygems_version: 3.6.9
448
448
  specification_version: 4
449
- summary: The Ruby binding of playwright driver 1.64.0
449
+ summary: The Ruby binding of playwright driver 1.65.1
450
450
  test_files: []