playwright-ruby-client 1.48.1 → 1.50.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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/documentation/docs/api/browser.md +1 -1
  3. data/documentation/docs/api/browser_type.md +2 -0
  4. data/documentation/docs/api/clock.md +13 -1
  5. data/documentation/docs/api/element_handle.md +0 -1
  6. data/documentation/docs/api/experimental/android_device.md +1 -1
  7. data/documentation/docs/api/frame.md +0 -1
  8. data/documentation/docs/api/keyboard.md +5 -2
  9. data/documentation/docs/api/locator.md +49 -4
  10. data/documentation/docs/api/locator_assertions.md +59 -7
  11. data/documentation/docs/api/page.md +1 -5
  12. data/documentation/docs/api/route.md +1 -1
  13. data/documentation/docs/api/tracing.md +34 -0
  14. data/documentation/docs/include/api_coverage.md +7 -0
  15. data/lib/playwright/channel_owners/tracing.rb +12 -0
  16. data/lib/playwright/locator_assertions_impl.rb +45 -5
  17. data/lib/playwright/locator_impl.rb +7 -0
  18. data/lib/playwright/version.rb +2 -2
  19. data/lib/playwright_api/android.rb +4 -4
  20. data/lib/playwright_api/android_device.rb +10 -10
  21. data/lib/playwright_api/api_request_context.rb +4 -4
  22. data/lib/playwright_api/browser.rb +5 -5
  23. data/lib/playwright_api/browser_context.rb +13 -13
  24. data/lib/playwright_api/browser_type.rb +10 -11
  25. data/lib/playwright_api/cdp_session.rb +4 -4
  26. data/lib/playwright_api/clock.rb +13 -1
  27. data/lib/playwright_api/dialog.rb +4 -4
  28. data/lib/playwright_api/element_handle.rb +4 -4
  29. data/lib/playwright_api/frame.rb +8 -8
  30. data/lib/playwright_api/js_handle.rb +4 -4
  31. data/lib/playwright_api/keyboard.rb +1 -4
  32. data/lib/playwright_api/locator.rb +46 -4
  33. data/lib/playwright_api/locator_assertions.rb +48 -8
  34. data/lib/playwright_api/page.rb +12 -15
  35. data/lib/playwright_api/playwright.rb +4 -4
  36. data/lib/playwright_api/request.rb +4 -4
  37. data/lib/playwright_api/response.rb +4 -4
  38. data/lib/playwright_api/route.rb +5 -5
  39. data/lib/playwright_api/selectors.rb +4 -4
  40. data/lib/playwright_api/tracing.rb +29 -4
  41. data/lib/playwright_api/web_socket.rb +4 -4
  42. data/lib/playwright_api/worker.rb +4 -4
  43. data/sig/playwright.rbs +9 -2
  44. metadata +4 -8
@@ -32,7 +32,7 @@ module Playwright
32
32
  #
33
33
  # **Details**
34
34
  #
35
- # Note that any overrides such as `url` or `headers` only apply to the request being routed. If this request results in a redirect, overrides will not be applied to the new redirected request. If you want to propagate a header through redirects, use the combination of [`method: Route.fetch`] and [`method: Route.fulfill`] instead.
35
+ # The `headers` option applies to both the routed request and any redirects it initiates. However, `url`, `method`, and `postData` only apply to the original request and are not carried over to redirected requests.
36
36
  #
37
37
  # [`method: Route.continue`] will immediately send the request to the network, other matching handlers won't be invoked. Use [`method: Route.fallback`] If you want next matching handler in the chain to be invoked.
38
38
  def continue(headers: nil, method: nil, postData: nil, url: nil)
@@ -180,14 +180,14 @@ module Playwright
180
180
 
181
181
  # -- inherited from EventEmitter --
182
182
  # @nodoc
183
- def once(event, callback)
184
- event_emitter_proxy.once(event, callback)
183
+ def on(event, callback)
184
+ event_emitter_proxy.on(event, callback)
185
185
  end
186
186
 
187
187
  # -- inherited from EventEmitter --
188
188
  # @nodoc
189
- def on(event, callback)
190
- event_emitter_proxy.on(event, callback)
189
+ def once(event, callback)
190
+ event_emitter_proxy.once(event, callback)
191
191
  end
192
192
 
193
193
  private def event_emitter_proxy
@@ -69,14 +69,14 @@ module Playwright
69
69
 
70
70
  # -- inherited from EventEmitter --
71
71
  # @nodoc
72
- def once(event, callback)
73
- event_emitter_proxy.once(event, callback)
72
+ def on(event, callback)
73
+ event_emitter_proxy.on(event, callback)
74
74
  end
75
75
 
76
76
  # -- inherited from EventEmitter --
77
77
  # @nodoc
78
- def on(event, callback)
79
- event_emitter_proxy.on(event, callback)
78
+ def once(event, callback)
79
+ event_emitter_proxy.once(event, callback)
80
80
  end
81
81
 
82
82
  private def event_emitter_proxy
@@ -58,6 +58,31 @@ module Playwright
58
58
  wrap_impl(@impl.start_chunk(name: unwrap_impl(name), title: unwrap_impl(title)))
59
59
  end
60
60
 
61
+ #
62
+ # **NOTE**: Use `test.step` instead when available.
63
+ #
64
+ # Creates a new group within the trace, assigning any subsequent API calls to this group, until [`method: Tracing.groupEnd`] is called. Groups can be nested and will be visible in the trace viewer.
65
+ #
66
+ # **Usage**
67
+ #
68
+ # ```python sync
69
+ # # All actions between group and group_end
70
+ # # will be shown in the trace viewer as a group.
71
+ # page.context.tracing.group("Open Playwright.dev > API")
72
+ # page.goto("https://playwright.dev/")
73
+ # page.get_by_role("link", name="API").click()
74
+ # page.context.tracing.group_end()
75
+ # ```
76
+ def group(name, location: nil)
77
+ wrap_impl(@impl.group(unwrap_impl(name), location: unwrap_impl(location)))
78
+ end
79
+
80
+ #
81
+ # Closes the last group created by [`method: Tracing.group`].
82
+ def group_end
83
+ wrap_impl(@impl.group_end)
84
+ end
85
+
61
86
  #
62
87
  # Stop tracing.
63
88
  def stop(path: nil)
@@ -78,14 +103,14 @@ module Playwright
78
103
 
79
104
  # -- inherited from EventEmitter --
80
105
  # @nodoc
81
- def once(event, callback)
82
- event_emitter_proxy.once(event, callback)
106
+ def on(event, callback)
107
+ event_emitter_proxy.on(event, callback)
83
108
  end
84
109
 
85
110
  # -- inherited from EventEmitter --
86
111
  # @nodoc
87
- def on(event, callback)
88
- event_emitter_proxy.on(event, callback)
112
+ def once(event, callback)
113
+ event_emitter_proxy.once(event, callback)
89
114
  end
90
115
 
91
116
  private def event_emitter_proxy
@@ -40,14 +40,14 @@ module Playwright
40
40
 
41
41
  # -- inherited from EventEmitter --
42
42
  # @nodoc
43
- def once(event, callback)
44
- event_emitter_proxy.once(event, callback)
43
+ def on(event, callback)
44
+ event_emitter_proxy.on(event, callback)
45
45
  end
46
46
 
47
47
  # -- inherited from EventEmitter --
48
48
  # @nodoc
49
- def on(event, callback)
50
- event_emitter_proxy.on(event, callback)
49
+ def once(event, callback)
50
+ event_emitter_proxy.once(event, callback)
51
51
  end
52
52
 
53
53
  private def event_emitter_proxy
@@ -64,14 +64,14 @@ module Playwright
64
64
 
65
65
  # -- inherited from EventEmitter --
66
66
  # @nodoc
67
- def once(event, callback)
68
- event_emitter_proxy.once(event, callback)
67
+ def on(event, callback)
68
+ event_emitter_proxy.on(event, callback)
69
69
  end
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
  private def event_emitter_proxy
data/sig/playwright.rbs CHANGED
@@ -445,6 +445,8 @@ module Playwright
445
445
  class Tracing
446
446
  def start: (?name: String, ?screenshots: bool, ?snapshots: bool, ?sources: bool, ?title: String) -> void
447
447
  def start_chunk: (?name: String, ?title: String) -> void
448
+ def group: (String name, ?location: Hash[untyped, untyped]) -> void
449
+ def group_end: -> void
448
450
  def stop: (?path: (String | File)) -> void
449
451
  def stop_chunk: (?path: (String | File)) -> void
450
452
  end
@@ -454,6 +456,7 @@ module Playwright
454
456
  def all_inner_texts: -> Array[untyped]
455
457
  def all_text_contents: -> Array[untyped]
456
458
  def and: (Locator locator) -> Locator
459
+ def aria_snapshot: (?timeout: Float) -> String
457
460
  def blur: (?timeout: Float) -> void
458
461
  def bounding_box: (?timeout: Float) -> (nil | Hash[untyped, untyped])
459
462
  def check: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
@@ -569,6 +572,7 @@ module Playwright
569
572
  def not_to_be_visible: (?timeout: Float, ?visible: bool) -> void
570
573
  def not_to_contain_text: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?ignoreCase: bool, ?timeout: Float, ?useInnerText: bool) -> void
571
574
  def not_to_have_accessible_description: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
575
+ def not_to_have_accessible_error_message: ((String | Regexp) errorMessage, ?ignoreCase: bool, ?timeout: Float) -> void
572
576
  def not_to_have_accessible_name: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
573
577
  def not_to_have_attribute: (String name, (String | Regexp) value, ?ignoreCase: bool, ?timeout: Float) -> void
574
578
  def not_to_have_class: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?timeout: Float) -> void
@@ -580,8 +584,9 @@ module Playwright
580
584
  def not_to_have_text: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?ignoreCase: bool, ?timeout: Float, ?useInnerText: bool) -> void
581
585
  def not_to_have_value: ((String | Regexp) value, ?timeout: Float) -> void
582
586
  def not_to_have_values: ((Array[untyped] | Array[untyped] | Array[untyped]) values, ?timeout: Float) -> void
587
+ def not_to_match_aria_snapshot: (String expected, ?timeout: Float) -> void
583
588
  def to_be_attached: (?attached: bool, ?timeout: Float) -> void
584
- def to_be_checked: (?checked: bool, ?timeout: Float) -> void
589
+ def to_be_checked: (?checked: bool, ?indeterminate: bool, ?timeout: Float) -> void
585
590
  def to_be_disabled: (?timeout: Float) -> void
586
591
  def to_be_editable: (?editable: bool, ?timeout: Float) -> void
587
592
  def to_be_empty: (?timeout: Float) -> void
@@ -592,6 +597,7 @@ module Playwright
592
597
  def to_be_visible: (?timeout: Float, ?visible: bool) -> void
593
598
  def to_contain_text: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?ignoreCase: bool, ?timeout: Float, ?useInnerText: bool) -> void
594
599
  def to_have_accessible_description: ((String | Regexp) description, ?ignoreCase: bool, ?timeout: Float) -> void
600
+ def to_have_accessible_error_message: ((String | Regexp) errorMessage, ?ignoreCase: bool, ?timeout: Float) -> void
595
601
  def to_have_accessible_name: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
596
602
  def to_have_attribute: (String name, (String | Regexp) value, ?ignoreCase: bool, ?timeout: Float) -> void
597
603
  def to_have_class: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?timeout: Float) -> void
@@ -603,6 +609,7 @@ module Playwright
603
609
  def to_have_text: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?ignoreCase: bool, ?timeout: Float, ?useInnerText: bool) -> void
604
610
  def to_have_value: ((String | Regexp) value, ?timeout: Float) -> void
605
611
  def to_have_values: ((Array[untyped] | Array[untyped] | Array[untyped]) values, ?timeout: Float) -> void
612
+ def to_match_aria_snapshot: (String expected, ?timeout: Float) -> void
606
613
  end
607
614
 
608
615
  class PageAssertions
@@ -619,7 +626,7 @@ module Playwright
619
626
  class AndroidDevice
620
627
  def close: -> void
621
628
  def info: (untyped selector) -> untyped
622
- def launch_browser: (?acceptDownloads: bool, ?args: Array[untyped], ?baseURL: String, ?bypassCSP: bool, ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?command: String, ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: Hash[untyped, 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_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (untyped) -> untyped } -> BrowserContext
629
+ def launch_browser: (?acceptDownloads: bool, ?args: Array[untyped], ?baseURL: String, ?bypassCSP: bool, ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?pkg: String, ?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_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (untyped) -> untyped } -> BrowserContext
623
630
  def model: -> String
624
631
  def screenshot: (?path: (String | File)) -> String
625
632
  def serial: -> String
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playwright-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.48.1
4
+ version: 1.50.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-11-30 00:00:00.000000000 Z
10
+ date: 2025-02-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: concurrent-ruby
@@ -192,7 +191,6 @@ dependencies:
192
191
  - - ">="
193
192
  - !ruby/object:Gem::Version
194
193
  version: '0'
195
- description:
196
194
  email:
197
195
  - q7w8e9w8q7w8e9@yahoo.co.jp
198
196
  executables: []
@@ -395,7 +393,6 @@ homepage: https://github.com/YusukeIwaki/playwright-ruby-client
395
393
  licenses:
396
394
  - MIT
397
395
  metadata: {}
398
- post_install_message:
399
396
  rdoc_options: []
400
397
  require_paths:
401
398
  - lib
@@ -410,8 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
410
407
  - !ruby/object:Gem::Version
411
408
  version: '0'
412
409
  requirements: []
413
- rubygems_version: 3.3.27
414
- signing_key:
410
+ rubygems_version: 3.6.2
415
411
  specification_version: 4
416
- summary: The Ruby binding of playwright driver 1.48.2
412
+ summary: The Ruby binding of playwright driver 1.50.1
417
413
  test_files: []