playwright-ruby-client 1.59.1 → 1.60.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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/documentation/docs/api/api_request.md +25 -1
  3. data/documentation/docs/api/api_request_context.md +13 -11
  4. data/documentation/docs/api/browser.md +18 -0
  5. data/documentation/docs/api/browser_context.md +1 -1
  6. data/documentation/docs/api/browser_type.md +18 -0
  7. data/documentation/docs/api/frame.md +1 -0
  8. data/documentation/docs/api/frame_locator.md +1 -0
  9. data/documentation/docs/api/locator.md +37 -2
  10. data/documentation/docs/api/locator_assertions.md +1 -1
  11. data/documentation/docs/api/page.md +12 -2
  12. data/documentation/docs/api/page_assertions.md +28 -0
  13. data/documentation/docs/api/playwright.md +5 -0
  14. data/documentation/docs/api/tracing.md +29 -0
  15. data/documentation/docs/include/api_coverage.md +14 -60
  16. data/lib/playwright/api_request_impl.rb +70 -0
  17. data/lib/playwright/channel_owners/api_request_context.rb +5 -1
  18. data/lib/playwright/channel_owners/binding_call.rb +3 -9
  19. data/lib/playwright/channel_owners/browser.rb +17 -0
  20. data/lib/playwright/channel_owners/browser_context.rb +10 -54
  21. data/lib/playwright/channel_owners/browser_type.rb +34 -1
  22. data/lib/playwright/channel_owners/frame.rb +89 -3
  23. data/lib/playwright/channel_owners/json_pipe.rb +4 -0
  24. data/lib/playwright/channel_owners/local_utils.rb +11 -2
  25. data/lib/playwright/channel_owners/page.rb +16 -11
  26. data/lib/playwright/channel_owners/playwright.rb +4 -0
  27. data/lib/playwright/channel_owners/tracing.rb +105 -4
  28. data/lib/playwright/connection.rb +5 -1
  29. data/lib/playwright/console_message_impl.rb +10 -1
  30. data/lib/playwright/errors.rb +3 -2
  31. data/lib/playwright/events.rb +7 -0
  32. data/lib/playwright/json_pipe_transport.rb +40 -0
  33. data/lib/playwright/locator_assertions_impl.rb +21 -4
  34. data/lib/playwright/locator_impl.rb +17 -3
  35. data/lib/playwright/locator_utils.rb +2 -0
  36. data/lib/playwright/page_assertions_impl.rb +33 -3
  37. data/lib/playwright/screencast.rb +5 -1
  38. data/lib/playwright/url_matcher.rb +35 -0
  39. data/lib/playwright/version.rb +2 -2
  40. data/lib/playwright.rb +1 -0
  41. data/lib/playwright_api/api_request.rb +1 -1
  42. data/lib/playwright_api/api_request_context.rb +15 -11
  43. data/lib/playwright_api/browser.rb +2 -2
  44. data/lib/playwright_api/browser_context.rb +7 -7
  45. data/lib/playwright_api/browser_type.rb +5 -3
  46. data/lib/playwright_api/frame.rb +18 -7
  47. data/lib/playwright_api/frame_locator.rb +2 -1
  48. data/lib/playwright_api/locator.rb +34 -5
  49. data/lib/playwright_api/locator_assertions.rb +2 -2
  50. data/lib/playwright_api/page.rb +27 -20
  51. data/lib/playwright_api/page_assertions.rb +22 -0
  52. data/lib/playwright_api/playwright.rb +1 -1
  53. data/lib/playwright_api/tracing.rb +23 -0
  54. data/sig/playwright.rbs +35 -43
  55. metadata +5 -12
  56. data/documentation/docs/api/experimental/android.md +0 -42
  57. data/documentation/docs/api/experimental/android_device.md +0 -109
  58. data/documentation/docs/api/experimental/android_input.md +0 -43
  59. data/documentation/docs/api/experimental/android_socket.md +0 -7
  60. data/documentation/docs/api/experimental/android_web_view.md +0 -7
  61. data/lib/playwright_api/android.rb +0 -68
  62. data/lib/playwright_api/android_device.rb +0 -229
  63. data/lib/playwright_api/android_input.rb +0 -34
  64. data/lib/playwright_api/android_socket.rb +0 -18
  65. data/lib/playwright_api/android_web_view.rb +0 -24
@@ -482,8 +482,8 @@ module Playwright
482
482
  # with sync_playwright() as playwright:
483
483
  # run(playwright)
484
484
  # ```
485
- def expose_binding(name, callback, handle: nil)
486
- wrap_impl(@impl.expose_binding(unwrap_impl(name), unwrap_impl(callback), handle: unwrap_impl(handle)))
485
+ def expose_binding(name, callback)
486
+ wrap_impl(@impl.expose_binding(unwrap_impl(name), unwrap_impl(callback)))
487
487
  end
488
488
 
489
489
  #
@@ -694,6 +694,7 @@ module Playwright
694
694
  def get_by_role(
695
695
  role,
696
696
  checked: nil,
697
+ description: nil,
697
698
  disabled: nil,
698
699
  exact: nil,
699
700
  expanded: nil,
@@ -702,7 +703,7 @@ module Playwright
702
703
  name: nil,
703
704
  pressed: nil,
704
705
  selected: nil)
705
- wrap_impl(@impl.get_by_role(unwrap_impl(role), checked: unwrap_impl(checked), disabled: unwrap_impl(disabled), exact: unwrap_impl(exact), expanded: unwrap_impl(expanded), includeHidden: unwrap_impl(includeHidden), level: unwrap_impl(level), name: unwrap_impl(name), pressed: unwrap_impl(pressed), selected: unwrap_impl(selected)))
706
+ wrap_impl(@impl.get_by_role(unwrap_impl(role), checked: unwrap_impl(checked), description: unwrap_impl(description), disabled: unwrap_impl(disabled), exact: unwrap_impl(exact), expanded: unwrap_impl(expanded), includeHidden: unwrap_impl(includeHidden), level: unwrap_impl(level), name: unwrap_impl(name), pressed: unwrap_impl(pressed), selected: unwrap_impl(selected)))
706
707
  end
707
708
 
708
709
  #
@@ -851,6 +852,12 @@ module Playwright
851
852
  wrap_impl(@impl.goto(unwrap_impl(url), referer: unwrap_impl(referer), timeout: unwrap_impl(timeout), waitUntil: unwrap_impl(waitUntil)))
852
853
  end
853
854
 
855
+ #
856
+ # Hide all locator highlight overlays previously added by [`method: Locator.highlight`] on this page.
857
+ def hide_highlight
858
+ wrap_impl(@impl.hide_highlight)
859
+ end
860
+
854
861
  #
855
862
  # This method hovers over an element matching `selector` by performing the following steps:
856
863
  # 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
@@ -1474,8 +1481,8 @@ module Playwright
1474
1481
 
1475
1482
  #
1476
1483
  # Captures the aria snapshot of the page. Read more about [aria snapshots](../aria-snapshots.md).
1477
- def aria_snapshot(depth: nil, mode: nil, timeout: nil)
1478
- wrap_impl(@impl.aria_snapshot(depth: unwrap_impl(depth), mode: unwrap_impl(mode), timeout: unwrap_impl(timeout)))
1484
+ def aria_snapshot(boxes: nil, depth: nil, mode: nil, timeout: nil)
1485
+ wrap_impl(@impl.aria_snapshot(boxes: unwrap_impl(boxes), depth: unwrap_impl(depth), mode: unwrap_impl(mode), timeout: unwrap_impl(timeout)))
1479
1486
  end
1480
1487
 
1481
1488
  #
@@ -1861,6 +1868,16 @@ module Playwright
1861
1868
  raise NotImplementedError.new('wait_for_event is not implemented yet.')
1862
1869
  end
1863
1870
 
1871
+ # @nodoc
1872
+ def start_css_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
1873
+ wrap_impl(@impl.start_css_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
1874
+ end
1875
+
1876
+ # @nodoc
1877
+ def _assertions(timeout, is_not, message)
1878
+ wrap_impl(@impl._assertions(unwrap_impl(timeout), unwrap_impl(is_not), unwrap_impl(message)))
1879
+ end
1880
+
1864
1881
  # @nodoc
1865
1882
  def guid
1866
1883
  wrap_impl(@impl.guid)
@@ -1871,6 +1888,11 @@ module Playwright
1871
1888
  wrap_impl(@impl.owned_context=(unwrap_impl(req)))
1872
1889
  end
1873
1890
 
1891
+ # @nodoc
1892
+ def snapshot_for_ai(timeout: nil, depth: nil, boxes: nil, _track: nil)
1893
+ wrap_impl(@impl.snapshot_for_ai(timeout: unwrap_impl(timeout), depth: unwrap_impl(depth), boxes: unwrap_impl(boxes), _track: unwrap_impl(_track)))
1894
+ end
1895
+
1874
1896
  # @nodoc
1875
1897
  def start_js_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
1876
1898
  wrap_impl(@impl.start_js_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
@@ -1881,26 +1903,11 @@ module Playwright
1881
1903
  wrap_impl(@impl.stop_js_coverage)
1882
1904
  end
1883
1905
 
1884
- # @nodoc
1885
- def snapshot_for_ai(timeout: nil, depth: nil, _track: nil)
1886
- wrap_impl(@impl.snapshot_for_ai(timeout: unwrap_impl(timeout), depth: unwrap_impl(depth), _track: unwrap_impl(_track)))
1887
- end
1888
-
1889
1906
  # @nodoc
1890
1907
  def stop_css_coverage
1891
1908
  wrap_impl(@impl.stop_css_coverage)
1892
1909
  end
1893
1910
 
1894
- # @nodoc
1895
- def _assertions(timeout, is_not, message)
1896
- wrap_impl(@impl._assertions(unwrap_impl(timeout), unwrap_impl(is_not), unwrap_impl(message)))
1897
- end
1898
-
1899
- # @nodoc
1900
- def start_css_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
1901
- wrap_impl(@impl.start_css_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
1902
- end
1903
-
1904
1911
  # -- inherited from EventEmitter --
1905
1912
  # @nodoc
1906
1913
  def on(event, callback)
@@ -25,6 +25,28 @@ module Playwright
25
25
  wrap_impl(@impl.not_to_have_url(unwrap_impl(urlOrRegExp), ignoreCase: unwrap_impl(ignoreCase), timeout: unwrap_impl(timeout)))
26
26
  end
27
27
 
28
+ #
29
+ # Asserts that the page body matches the given [accessibility snapshot](../aria-snapshots.md).
30
+ #
31
+ # **Usage**
32
+ #
33
+ # ```python sync
34
+ # page.goto("https://demo.playwright.dev/todomvc/")
35
+ # expect(page).to_match_aria_snapshot('''
36
+ # - heading "todos"
37
+ # - textbox "What needs to be done?"
38
+ # ''')
39
+ # ```
40
+ def to_match_aria_snapshot(expected, timeout: nil)
41
+ wrap_impl(@impl.to_match_aria_snapshot(unwrap_impl(expected), timeout: unwrap_impl(timeout)))
42
+ end
43
+
44
+ #
45
+ # The opposite of [`method: PageAssertions.toMatchAriaSnapshot`].
46
+ def not_to_match_aria_snapshot(expected, timeout: nil)
47
+ wrap_impl(@impl.not_to_match_aria_snapshot(unwrap_impl(expected), timeout: unwrap_impl(timeout)))
48
+ end
49
+
28
50
  #
29
51
  # Ensures the page has the given title.
30
52
  #
@@ -57,7 +57,7 @@ module Playwright
57
57
  #
58
58
  # Exposes API that can be used for the Web API testing.
59
59
  def request # property
60
- raise NotImplementedError.new('request is not implemented yet.')
60
+ wrap_impl(@impl.request)
61
61
  end
62
62
 
63
63
  #
@@ -67,6 +67,23 @@ module Playwright
67
67
  wrap_impl(@impl.start_chunk(name: unwrap_impl(name), title: unwrap_impl(title)))
68
68
  end
69
69
 
70
+ #
71
+ # Start recording a HAR (HTTP Archive) of network activity in this context. The HAR file is written to disk when [`method: Tracing.stopHar`] is called, or when the returned `Disposable` is disposed.
72
+ #
73
+ # Only one HAR recording can be active at a time per `BrowserContext`.
74
+ #
75
+ # **Usage**
76
+ #
77
+ # ```python sync
78
+ # context.tracing.start_har("trace.har")
79
+ # page = context.new_page()
80
+ # page.goto("https://playwright.dev")
81
+ # context.tracing.stop_har()
82
+ # ```
83
+ def start_har(path, content: nil, mode: nil, urlFilter: nil)
84
+ wrap_impl(@impl.start_har(unwrap_impl(path), content: unwrap_impl(content), mode: unwrap_impl(mode), urlFilter: unwrap_impl(urlFilter)))
85
+ end
86
+
70
87
  #
71
88
  # **NOTE**: Use `test.step` instead when available.
72
89
  #
@@ -104,6 +121,12 @@ module Playwright
104
121
  wrap_impl(@impl.stop_chunk(path: unwrap_impl(path)))
105
122
  end
106
123
 
124
+ #
125
+ # Stop HAR recording and save the HAR file to the path given to [`method: Tracing.startHar`].
126
+ def stop_har
127
+ wrap_impl(@impl.stop_har)
128
+ end
129
+
107
130
  # -- inherited from EventEmitter --
108
131
  # @nodoc
109
132
  def on(event, callback)
data/sig/playwright.rbs CHANGED
@@ -166,7 +166,7 @@ module Playwright
166
166
  def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
167
167
  def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
168
168
  def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
169
- def get_by_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, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
169
+ def get_by_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, ?checked: bool, ?description: (String | Regexp), ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
170
170
  def get_by_test_id: ((String | Regexp) testId) -> Locator
171
171
  def get_by_testid: ((String | Regexp) testId) -> Locator
172
172
  def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
@@ -283,7 +283,7 @@ module Playwright
283
283
  def eval_on_selector_all: (String selector, String expression, ?arg: untyped) -> untyped
284
284
  def evaluate: (String expression, ?arg: untyped) -> untyped
285
285
  def evaluate_handle: (String expression, ?arg: untyped) -> JSHandle
286
- def expose_binding: (String name, function callback, ?handle: bool) -> untyped
286
+ def expose_binding: (String name, function callback) -> untyped
287
287
  def expose_function: (String name, function callback) -> untyped
288
288
  def fill: (String selector, String value, ?force: bool, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
289
289
  def focus: (String selector, ?strict: bool, ?timeout: Float) -> void
@@ -294,7 +294,7 @@ module Playwright
294
294
  def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
295
295
  def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
296
296
  def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
297
- def get_by_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, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
297
+ def get_by_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, ?checked: bool, ?description: (String | Regexp), ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
298
298
  def get_by_test_id: ((String | Regexp) testId) -> Locator
299
299
  def get_by_testid: ((String | Regexp) testId) -> Locator
300
300
  def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
@@ -302,6 +302,7 @@ module Playwright
302
302
  def go_back: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
303
303
  def go_forward: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
304
304
  def goto: (String url, ?referer: String, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
305
+ def hide_highlight: -> void
305
306
  def hover: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
306
307
  def inner_html: (String selector, ?strict: bool, ?timeout: Float) -> String
307
308
  def inner_text: (String selector, ?strict: bool, ?timeout: Float) -> String
@@ -344,7 +345,7 @@ module Playwright
344
345
  def set_input_files: (String selector, ((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
345
346
  def set_viewport_size: (Hash[untyped, untyped] viewportSize) -> void
346
347
  def viewport_size=: (Hash[untyped, untyped] viewportSize) -> void
347
- def aria_snapshot: (?depth: Integer, ?mode: ("ai" | "default"), ?timeout: Float) -> String
348
+ def aria_snapshot: (?boxes: bool, ?depth: Integer, ?mode: ("ai" | "default"), ?timeout: Float) -> String
348
349
  def tap_point: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
349
350
  def text_content: (String selector, ?strict: bool, ?timeout: Float) -> (nil | String)
350
351
  def title: -> String
@@ -390,7 +391,7 @@ module Playwright
390
391
  def clear_permissions: -> void
391
392
  def close: (?reason: String) -> void
392
393
  def cookies: (?urls: (String | Array[untyped])) -> Array[untyped]
393
- def expose_binding: (String name, function callback, ?handle: bool) -> untyped
394
+ def expose_binding: (String name, function callback) -> untyped
394
395
  def expose_function: (String name, function callback) -> untyped
395
396
  def grant_permissions: (Array[untyped] permissions, ?origin: String) -> void
396
397
  def closed?: -> bool
@@ -437,13 +438,16 @@ module Playwright
437
438
  def new_browser_cdp_session: -> CDPSession
438
439
  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], ?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"), ?storageState: ((String | File) | Hash[untyped, untyped]), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (BrowserContext) -> untyped } -> BrowserContext
439
440
  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], ?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"), ?storageState: ((String | File) | Hash[untyped, untyped]), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (Page) -> untyped } -> Page
441
+ def bind: (String title, ?host: String, ?port: Integer, ?workspaceDir: String) -> Hash[untyped, untyped]
440
442
  def start_tracing: (?page: Page, ?categories: Array[untyped], ?path: (String | File), ?screenshots: bool) -> void
441
443
  def stop_tracing: -> String
444
+ def unbind: -> void
442
445
  def version: -> String
443
446
  end
444
447
 
445
448
  class BrowserType
446
- def connect_over_cdp: (String endpointURL, ?headers: Hash[untyped, untyped], ?isLocal: bool, ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
449
+ def connect: (String endpoint, ?exposeNetwork: String, ?headers: Hash[untyped, untyped], ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
450
+ def connect_over_cdp: (String endpointURL, ?headers: Hash[untyped, untyped], ?isLocal: bool, ?noDefaults: bool, ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
447
451
  def executable_path: -> String
448
452
  def launch: (?args: Array[untyped], ?artifactsDir: (String | File), ?channel: String, ?chromiumSandbox: bool, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?firefoxUserPrefs: Hash[untyped, untyped], ?handleSIGHUP: bool, ?handleSIGINT: bool, ?handleSIGTERM: bool, ?headless: bool, ?ignoreDefaultArgs: (bool | Array[untyped]), ?proxy: Hash[untyped, untyped], ?slowMo: Float, ?timeout: Float, ?tracesDir: (String | File)) ?{ (Browser) -> untyped } -> Browser
449
453
  def launch_persistent_context: ((String | File) userDataDir, ?acceptDownloads: bool, ?args: Array[untyped], ?artifactsDir: (String | File), ?baseURL: String, ?bypassCSP: bool, ?channel: String, ?chromiumSandbox: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?extraHTTPHeaders: Hash[untyped, untyped], ?firefoxUserPrefs: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?handleSIGHUP: bool, ?handleSIGINT: bool, ?handleSIGTERM: bool, ?hasTouch: bool, ?headless: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreDefaultArgs: (bool | 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_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?slowMo: Float, ?strictSelectors: bool, ?timeout: Float, ?timezoneId: String, ?tracesDir: (String | File), ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (untyped) -> untyped } -> BrowserContext
@@ -454,6 +458,7 @@ module Playwright
454
458
  attr_reader chromium: BrowserType
455
459
  attr_reader devices: Hash[untyped, untyped]
456
460
  attr_reader firefox: BrowserType
461
+ attr_reader request: APIRequest
457
462
  attr_reader selectors: Selectors
458
463
  attr_reader webkit: BrowserType
459
464
  end
@@ -461,10 +466,12 @@ module Playwright
461
466
  class Tracing
462
467
  def start: (?live: bool, ?name: String, ?screenshots: bool, ?snapshots: bool, ?sources: bool, ?title: String) -> void
463
468
  def start_chunk: (?name: String, ?title: String) -> void
469
+ def start_har: ((String | File) path, ?content: ("omit" | "embed" | "attach"), ?mode: ("full" | "minimal"), ?urlFilter: (String | Regexp)) -> untyped
464
470
  def group: (String name, ?location: Hash[untyped, untyped]) -> untyped
465
471
  def group_end: -> void
466
472
  def stop: (?path: (String | File)) -> void
467
473
  def stop_chunk: (?path: (String | File)) -> void
474
+ def stop_har: -> void
468
475
  end
469
476
 
470
477
  class Locator
@@ -472,7 +479,7 @@ module Playwright
472
479
  def all_inner_texts: -> Array[untyped]
473
480
  def all_text_contents: -> Array[untyped]
474
481
  def and: (Locator locator) -> Locator
475
- def aria_snapshot: (?depth: Integer, ?mode: ("ai" | "default"), ?timeout: Float) -> String
482
+ def aria_snapshot: (?boxes: bool, ?depth: Integer, ?mode: ("ai" | "default"), ?timeout: Float) -> String
476
483
  def blur: (?timeout: Float) -> void
477
484
  def bounding_box: (?timeout: Float) -> (nil | Hash[untyped, untyped])
478
485
  def check: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
@@ -484,6 +491,7 @@ module Playwright
484
491
  def description: -> (nil | String)
485
492
  def dispatch_event: (String type_, ?eventInit: untyped, ?timeout: Float) -> void
486
493
  def drag_to: (Locator target, ?force: bool, ?noWaitAfter: bool, ?sourcePosition: Hash[untyped, untyped], ?steps: Integer, ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
494
+ def drop: (Hash[untyped, untyped] payload, ?position: Hash[untyped, untyped], ?timeout: Float) -> void
487
495
  def element_handle: (?timeout: Float) -> ElementHandle
488
496
  def element_handles: -> Array[untyped]
489
497
  def content_frame: -> FrameLocator
@@ -500,12 +508,13 @@ module Playwright
500
508
  def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
501
509
  def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
502
510
  def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
503
- def get_by_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, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
511
+ def get_by_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, ?checked: bool, ?description: (String | Regexp), ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
504
512
  def get_by_test_id: ((String | Regexp) testId) -> Locator
505
513
  def get_by_testid: ((String | Regexp) testId) -> Locator
506
514
  def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
507
515
  def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
508
- def highlight: -> void
516
+ def hide_highlight: -> void
517
+ def highlight: (?style: String) -> untyped
509
518
  def hover: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
510
519
  def inner_html: (?timeout: Float) -> String
511
520
  def inner_text: (?timeout: Float) -> String
@@ -545,7 +554,7 @@ module Playwright
545
554
  def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
546
555
  def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
547
556
  def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
548
- def get_by_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, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
557
+ def get_by_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, ?checked: bool, ?description: (String | Regexp), ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
549
558
  def get_by_test_id: ((String | Regexp) testId) -> Locator
550
559
  def get_by_testid: ((String | Regexp) testId) -> Locator
551
560
  def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
@@ -570,14 +579,20 @@ module Playwright
570
579
  end
571
580
 
572
581
  class APIRequestContext
573
- def delete: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
582
+ def delete: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
574
583
  def dispose: (?reason: String) -> void
575
- def fetch: ((String | Request) urlOrRequest, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?method: String, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
576
- def get: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
577
- def head: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
578
- def patch: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
579
- def post: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
580
- def put: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
584
+ def fetch: ((String | Request) urlOrRequest, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?method: String, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
585
+ def get: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
586
+ def head: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
587
+ def patch: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
588
+ def post: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
589
+ def put: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
590
+
591
+ attr_reader tracing: Tracing
592
+ end
593
+
594
+ class APIRequest
595
+ def new_context: (?baseURL: String, ?clientCertificates: Array[untyped], ?extraHTTPHeaders: Hash[untyped, untyped], ?failOnStatusCode: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?proxy: Hash[untyped, untyped], ?storageState: ((String | File) | Hash[untyped, untyped]), ?timeout: Float, ?userAgent: String) -> APIRequestContext
581
596
  end
582
597
 
583
598
  class LocatorAssertions
@@ -625,7 +640,7 @@ module Playwright
625
640
  def to_have_attribute: (String name, (String | Regexp) value, ?ignoreCase: bool, ?timeout: Float) -> void
626
641
  def to_have_class: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?timeout: Float) -> void
627
642
  def to_have_count: (Integer count, ?timeout: Float) -> void
628
- def to_have_css: (String name, (String | Regexp) value, ?timeout: Float) -> void
643
+ def to_have_css: (String name, (String | Regexp) value, ?pseudo: ("before" | "after"), ?timeout: Float) -> void
629
644
  def to_have_id: ((String | Regexp) id, ?timeout: Float) -> void
630
645
  def to_have_js_property: (String name, untyped value, ?timeout: Float) -> void
631
646
  def 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
@@ -638,34 +653,11 @@ module Playwright
638
653
  class PageAssertions
639
654
  def not_to_have_title: ((String | Regexp) titleOrRegExp, ?timeout: Float) -> void
640
655
  def not_to_have_url: ((String | Regexp) urlOrRegExp, ?ignoreCase: bool, ?timeout: Float) -> void
656
+ def to_match_aria_snapshot: (String expected, ?timeout: Float) -> void
657
+ def not_to_match_aria_snapshot: (String expected, ?timeout: Float) -> void
641
658
  def to_have_title: ((String | Regexp) titleOrRegExp, ?timeout: Float) -> void
642
659
  def to_have_url: ((String | Regexp) urlOrRegExp, ?ignoreCase: bool, ?timeout: Float) -> void
643
660
  end
644
661
 
645
- class Android
646
- def devices: (?host: String, ?omitDriverInstall: bool, ?port: Integer) -> Array[untyped]
647
- def set_default_timeout: (Float timeout) -> void
648
- def default_timeout=: (Float timeout) -> void
649
- end
650
-
651
- class AndroidDevice
652
- def close: -> void
653
- def info: (untyped selector) -> untyped
654
- def launch_browser: (?acceptDownloads: bool, ?args: Array[untyped], ?baseURL: String, ?bypassCSP: bool, ?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], ?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
655
- def model: -> String
656
- def screenshot: (?path: (String | File)) -> String
657
- def serial: -> String
658
- def shell: (String command) -> String
659
-
660
- attr_reader input: AndroidInput
661
- end
662
-
663
- class AndroidInput
664
- def drag: (Hash[untyped, untyped] from, Hash[untyped, untyped] to, Integer steps) -> void
665
- def press: (untyped key) -> void
666
- def tap_point: (Hash[untyped, untyped] point) -> void
667
- def type: (String text) -> void
668
- end
669
-
670
662
  def self.create: (playwright_cli_executable_path: String) { (Playwright) -> void } -> void
671
663
  end
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.59.1
4
+ version: 1.60.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
@@ -249,11 +249,6 @@ files:
249
249
  - documentation/docs/api/download.md
250
250
  - documentation/docs/api/element_handle.md
251
251
  - documentation/docs/api/experimental/_category_.yml
252
- - documentation/docs/api/experimental/android.md
253
- - documentation/docs/api/experimental/android_device.md
254
- - documentation/docs/api/experimental/android_input.md
255
- - documentation/docs/api/experimental/android_socket.md
256
- - documentation/docs/api/experimental/android_web_view.md
257
252
  - documentation/docs/api/file_chooser.md
258
253
  - documentation/docs/api/frame.md
259
254
  - documentation/docs/api/frame_locator.md
@@ -306,6 +301,7 @@ files:
306
301
  - lib/playwright.rb
307
302
  - lib/playwright/android_input_impl.rb
308
303
  - lib/playwright/api_implementation.rb
304
+ - lib/playwright/api_request_impl.rb
309
305
  - lib/playwright/api_response_impl.rb
310
306
  - lib/playwright/channel.rb
311
307
  - lib/playwright/channel_owner.rb
@@ -326,6 +322,7 @@ files:
326
322
  - lib/playwright/channel_owners/fetch_request.rb
327
323
  - lib/playwright/channel_owners/frame.rb
328
324
  - lib/playwright/channel_owners/js_handle.rb
325
+ - lib/playwright/channel_owners/json_pipe.rb
329
326
  - lib/playwright/channel_owners/local_utils.rb
330
327
  - lib/playwright/channel_owners/overlay.rb
331
328
  - lib/playwright/channel_owners/page.rb
@@ -359,6 +356,7 @@ files:
359
356
  - lib/playwright/javascript/value_parser.rb
360
357
  - lib/playwright/javascript/value_serializer.rb
361
358
  - lib/playwright/javascript/visitor_info.rb
359
+ - lib/playwright/json_pipe_transport.rb
362
360
  - lib/playwright/keyboard_impl.rb
363
361
  - lib/playwright/locator_assertions_impl.rb
364
362
  - lib/playwright/locator_impl.rb
@@ -382,11 +380,6 @@ files:
382
380
  - lib/playwright/waiter.rb
383
381
  - lib/playwright/web_socket_client.rb
384
382
  - lib/playwright/web_socket_transport.rb
385
- - lib/playwright_api/android.rb
386
- - lib/playwright_api/android_device.rb
387
- - lib/playwright_api/android_input.rb
388
- - lib/playwright_api/android_socket.rb
389
- - lib/playwright_api/android_web_view.rb
390
383
  - lib/playwright_api/api_request.rb
391
384
  - lib/playwright_api/api_request_context.rb
392
385
  - lib/playwright_api/api_response.rb
@@ -440,5 +433,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
440
433
  requirements: []
441
434
  rubygems_version: 3.6.9
442
435
  specification_version: 4
443
- summary: The Ruby binding of playwright driver 1.59.0
436
+ summary: The Ruby binding of playwright driver 1.60.0
444
437
  test_files: []
@@ -1,42 +0,0 @@
1
- ---
2
- sidebar_position: 10
3
- ---
4
-
5
- # Android
6
-
7
-
8
- Playwright has **experimental** support for Android automation. This includes Chrome for Android and Android WebView.
9
-
10
- *Requirements*
11
- - Android device or AVD Emulator.
12
- - [ADB daemon](https://developer.android.com/studio/command-line/adb) running and authenticated with your device. Typically running `adb devices` is all you need to do.
13
- - [`Chrome 87`](https://play.google.com/store/apps/details?id=com.android.chrome) or newer installed on the device
14
- - "Enable command line on non-rooted devices" enabled in `chrome://flags`.
15
-
16
- *Known limitations*
17
- - Raw USB operation is not yet supported, so you need ADB.
18
- - Device needs to be awake to produce screenshots. Enabling "Stay awake" developer mode will help.
19
- - We didn't run all the tests against the device, so not everything works.
20
-
21
- *How to run*
22
-
23
- An example of the Android automation script would be:
24
-
25
- ## devices
26
-
27
- ```
28
- def devices(host: nil, omitDriverInstall: nil, port: nil)
29
- ```
30
-
31
-
32
- Returns the list of detected Android devices.
33
-
34
- ## set_default_timeout
35
-
36
- ```
37
- def set_default_timeout(timeout)
38
- ```
39
- alias: `default_timeout=`
40
-
41
-
42
- This setting will change the default maximum time for all the methods accepting `timeout` option.
@@ -1,109 +0,0 @@
1
- ---
2
- sidebar_position: 10
3
- ---
4
-
5
- # AndroidDevice
6
-
7
-
8
- [AndroidDevice](./android_device) represents a connected device, either real hardware or emulated. Devices can be obtained using [Android#devices](./android#devices).
9
-
10
- ## close
11
-
12
- ```
13
- def close
14
- ```
15
-
16
-
17
- Disconnects from the device.
18
-
19
- ## info
20
-
21
- ```
22
- def info(selector)
23
- ```
24
-
25
-
26
- Returns information about a widget defined by `selector`.
27
-
28
- ## launch_browser
29
-
30
- ```
31
- def launch_browser(
32
- acceptDownloads: nil,
33
- args: nil,
34
- baseURL: nil,
35
- bypassCSP: nil,
36
- colorScheme: nil,
37
- contrast: nil,
38
- deviceScaleFactor: nil,
39
- extraHTTPHeaders: nil,
40
- forcedColors: nil,
41
- geolocation: nil,
42
- hasTouch: nil,
43
- httpCredentials: nil,
44
- ignoreHTTPSErrors: nil,
45
- isMobile: nil,
46
- javaScriptEnabled: nil,
47
- locale: nil,
48
- noViewport: nil,
49
- offline: nil,
50
- permissions: nil,
51
- pkg: nil,
52
- proxy: nil,
53
- record_har_content: nil,
54
- record_har_mode: nil,
55
- record_har_omit_content: nil,
56
- record_har_path: nil,
57
- record_har_url_filter: nil,
58
- record_video_dir: nil,
59
- record_video_size: nil,
60
- reducedMotion: nil,
61
- screen: nil,
62
- serviceWorkers: nil,
63
- strictSelectors: nil,
64
- timezoneId: nil,
65
- userAgent: nil,
66
- viewport: nil,
67
- &block)
68
- ```
69
-
70
-
71
- Launches Chrome browser on the device, and returns its persistent context.
72
-
73
- ## model
74
-
75
- ```
76
- def model
77
- ```
78
-
79
-
80
- Device model.
81
-
82
- ## screenshot
83
-
84
- ```
85
- def screenshot(path: nil)
86
- ```
87
-
88
-
89
- Returns the buffer with the captured screenshot of the device.
90
-
91
- ## serial
92
-
93
- ```
94
- def serial
95
- ```
96
-
97
-
98
- Device serial number.
99
-
100
- ## shell
101
-
102
- ```
103
- def shell(command)
104
- ```
105
-
106
-
107
- Executes a shell command on the device and returns its output.
108
-
109
- ## input