playwright-ruby-client 1.60.0 → 1.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -17
  3. data/documentation/docs/api/api_response.md +30 -0
  4. data/documentation/docs/api/browser_context.md +11 -3
  5. data/documentation/docs/api/browser_type.md +3 -0
  6. data/documentation/docs/api/credentials.md +136 -0
  7. data/documentation/docs/api/element_handle.md +7 -0
  8. data/documentation/docs/api/frame.md +12 -4
  9. data/documentation/docs/api/locator.md +29 -0
  10. data/documentation/docs/api/locator_assertions.md +4 -2
  11. data/documentation/docs/api/page.md +26 -2
  12. data/documentation/docs/api/playwright.md +2 -2
  13. data/documentation/docs/api/touchscreen.md +1 -1
  14. data/documentation/docs/api/web_storage.md +65 -0
  15. data/documentation/docs/article/getting_started.md +12 -11
  16. data/documentation/docs/article/guides/download_playwright_driver.md +11 -32
  17. data/documentation/docs/article/guides/launch_browser.md +5 -4
  18. data/documentation/docs/article/guides/playwright_on_alpine_linux.md +6 -5
  19. data/documentation/docs/article/guides/rails_integration.md +72 -4
  20. data/documentation/docs/article/guides/rails_integration_with_null_driver.md +4 -3
  21. data/documentation/docs/article/guides/semi_automation.md +1 -1
  22. data/documentation/docs/article/guides/use_storage_state.md +1 -1
  23. data/documentation/docs/include/api_coverage.md +22 -0
  24. data/documentation/docusaurus.config.js +31 -0
  25. data/documentation/package.json +3 -0
  26. data/documentation/yarn.lock +159 -174
  27. data/lib/playwright/api_response_impl.rb +24 -0
  28. data/lib/playwright/channel_owners/browser_context.rb +8 -3
  29. data/lib/playwright/channel_owners/browser_type.rb +2 -1
  30. data/lib/playwright/channel_owners/element_handle.rb +14 -4
  31. data/lib/playwright/channel_owners/frame.rb +50 -17
  32. data/lib/playwright/channel_owners/page.rb +31 -10
  33. data/lib/playwright/connection.rb +16 -2
  34. data/lib/playwright/credentials_impl.rb +35 -0
  35. data/lib/playwright/errors.rb +4 -1
  36. data/lib/playwright/locator_assertions_impl.rb +14 -1
  37. data/lib/playwright/locator_impl.rb +28 -5
  38. data/lib/playwright/locator_utils.rb +9 -1
  39. data/lib/playwright/screencast.rb +22 -6
  40. data/lib/playwright/screenshot_utils.rb +24 -0
  41. data/lib/playwright/test.rb +12 -2
  42. data/lib/playwright/url_matcher.rb +120 -4
  43. data/lib/playwright/version.rb +2 -2
  44. data/lib/playwright/waiter.rb +9 -41
  45. data/lib/playwright/web_storage_impl.rb +34 -0
  46. data/lib/playwright.rb +2 -2
  47. data/lib/playwright_api/api_request_context.rb +6 -6
  48. data/lib/playwright_api/api_response.rb +21 -0
  49. data/lib/playwright_api/browser.rb +6 -6
  50. data/lib/playwright_api/browser_context.rb +27 -18
  51. data/lib/playwright_api/browser_type.rb +10 -7
  52. data/lib/playwright_api/cdp_session.rb +6 -6
  53. data/lib/playwright_api/credentials.rb +124 -0
  54. data/lib/playwright_api/dialog.rb +6 -6
  55. data/lib/playwright_api/element_handle.rb +20 -13
  56. data/lib/playwright_api/frame.rb +36 -28
  57. data/lib/playwright_api/js_handle.rb +6 -6
  58. data/lib/playwright_api/locator.rb +37 -11
  59. data/lib/playwright_api/locator_assertions.rb +6 -4
  60. data/lib/playwright_api/page.rb +55 -29
  61. data/lib/playwright_api/playwright.rb +6 -6
  62. data/lib/playwright_api/request.rb +6 -6
  63. data/lib/playwright_api/response.rb +6 -6
  64. data/lib/playwright_api/route.rb +6 -6
  65. data/lib/playwright_api/touchscreen.rb +1 -1
  66. data/lib/playwright_api/tracing.rb +6 -6
  67. data/lib/playwright_api/web_socket.rb +6 -6
  68. data/lib/playwright_api/web_storage.rb +48 -0
  69. data/lib/playwright_api/worker.rb +6 -6
  70. data/playwright.gemspec +5 -0
  71. data/sig/playwright.rbs +62 -40
  72. metadata +13 -3
data/sig/playwright.rbs CHANGED
@@ -95,10 +95,10 @@ module Playwright
95
95
 
96
96
  class ElementHandle < JSHandle
97
97
  def bounding_box: -> (nil | Hash[untyped, untyped])
98
- def check: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
99
- def click: (?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?steps: Integer, ?timeout: Float, ?trial: bool) -> void
98
+ def check: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
99
+ def click: (?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?steps: Integer, ?timeout: Float, ?trial: bool) -> void
100
100
  def content_frame: -> (nil | Frame)
101
- def dblclick: (?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?steps: Integer, ?timeout: Float, ?trial: bool) -> void
101
+ def dblclick: (?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?steps: Integer, ?timeout: Float, ?trial: bool) -> void
102
102
  def dispatch_event: (String type_, ?eventInit: untyped) -> void
103
103
  def eval_on_selector: (String selector, String expression, ?arg: untyped) -> untyped
104
104
  def eval_on_selector_all: (String selector, String expression, ?arg: untyped) -> untyped
@@ -106,7 +106,7 @@ module Playwright
106
106
  def focus: -> void
107
107
  def get_attribute: (String name) -> (nil | String)
108
108
  def []: (String name) -> (nil | String)
109
- def hover: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
109
+ def hover: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
110
110
  def inner_html: -> String
111
111
  def inner_text: -> String
112
112
  def input_value: (?timeout: Float) -> String
@@ -120,18 +120,18 @@ module Playwright
120
120
  def press: (String key, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
121
121
  def query_selector: (String selector) -> (nil | ElementHandle)
122
122
  def query_selector_all: (String selector) -> Array[untyped]
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")) -> String
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
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]
126
126
  def select_text: (?force: bool, ?timeout: Float) -> void
127
- def set_checked: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
128
- def checked=: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
127
+ def set_checked: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
128
+ def checked=: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
129
129
  def set_input_files: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
130
130
  def input_files=: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
131
- def tap_point: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
131
+ def tap_point: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
132
132
  def text_content: -> (nil | String)
133
133
  def type: (String text, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
134
- def uncheck: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
134
+ def uncheck: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
135
135
  def wait_for_element_state: (("visible" | "hidden" | "stable" | "enabled" | "disabled" | "editable") state, ?timeout: Float) -> void
136
136
  def wait_for_selector: (String selector, ?state: ("attached" | "detached" | "visible" | "hidden"), ?strict: bool, ?timeout: Float) -> (nil | ElementHandle)
137
137
  end
@@ -147,13 +147,13 @@ module Playwright
147
147
  class Frame
148
148
  def add_script_tag: (?content: String, ?path: (String | File), ?type: String, ?url: String) -> ElementHandle
149
149
  def add_style_tag: (?content: String, ?path: (String | File), ?url: String) -> ElementHandle
150
- def check: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
150
+ def check: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
151
151
  def child_frames: -> Array[untyped]
152
- def click: (String selector, ?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
152
+ def click: (String selector, ?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
153
153
  def content: -> String
154
- def dblclick: (String selector, ?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
154
+ def dblclick: (String selector, ?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
155
155
  def dispatch_event: (String selector, String type_, ?eventInit: untyped, ?strict: bool, ?timeout: Float) -> void
156
- def drag_and_drop: (String source, String target, ?force: bool, ?noWaitAfter: bool, ?sourcePosition: Hash[untyped, untyped], ?steps: Integer, ?strict: bool, ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
156
+ def drag_and_drop: (String source, String target, ?force: bool, ?noWaitAfter: bool, ?scroll: ("auto" | "none"), ?sourcePosition: Hash[untyped, untyped], ?steps: Integer, ?strict: bool, ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
157
157
  def eval_on_selector: (String selector, String expression, ?arg: untyped, ?strict: bool) -> untyped
158
158
  def eval_on_selector_all: (String selector, String expression, ?arg: untyped) -> untyped
159
159
  def evaluate: (String expression, ?arg: untyped) -> untyped
@@ -172,7 +172,7 @@ module Playwright
172
172
  def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
173
173
  def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
174
174
  def goto: (String url, ?referer: String, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
175
- def hover: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
175
+ def hover: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
176
176
  def inner_html: (String selector, ?strict: bool, ?timeout: Float) -> String
177
177
  def inner_text: (String selector, ?strict: bool, ?timeout: Float) -> String
178
178
  def input_value: (String selector, ?strict: bool, ?timeout: Float) -> String
@@ -191,15 +191,15 @@ module Playwright
191
191
  def query_selector: (String selector, ?strict: bool) -> (nil | ElementHandle)
192
192
  def query_selector_all: (String selector) -> Array[untyped]
193
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]
194
- def set_checked: (String selector, bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
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
197
197
  def set_input_files: (String selector, ((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
198
- def tap_point: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
198
+ def tap_point: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
199
199
  def text_content: (String selector, ?strict: bool, ?timeout: Float) -> (nil | String)
200
200
  def title: -> String
201
201
  def type: (String selector, String text, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
202
- def uncheck: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
202
+ def uncheck: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
203
203
  def url: -> String
204
204
  def wait_for_function: (String expression, ?arg: untyped, ?polling: (Float | "raf"), ?timeout: Float) -> JSHandle
205
205
  def wait_for_load_state: (?state: ("load" | "domcontentloaded" | "networkidle"), ?timeout: Float) -> void
@@ -270,14 +270,14 @@ module Playwright
270
270
  def add_style_tag: (?content: String, ?path: (String | File), ?url: String) -> ElementHandle
271
271
  def bring_to_front: -> void
272
272
  def cancel_pick_locator: -> void
273
- def check: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
274
- def click: (String selector, ?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
273
+ def check: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
274
+ def click: (String selector, ?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
275
275
  def close: (?reason: String, ?runBeforeUnload: bool) -> void
276
276
  def content: -> String
277
277
  def context: -> BrowserContext
278
- def dblclick: (String selector, ?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
278
+ def dblclick: (String selector, ?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
279
279
  def dispatch_event: (String selector, String type_, ?eventInit: untyped, ?strict: bool, ?timeout: Float) -> void
280
- def drag_and_drop: (String source, String target, ?force: bool, ?noWaitAfter: bool, ?sourcePosition: Hash[untyped, untyped], ?steps: Integer, ?strict: bool, ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
280
+ def drag_and_drop: (String source, String target, ?force: bool, ?noWaitAfter: bool, ?scroll: ("auto" | "none"), ?sourcePosition: Hash[untyped, untyped], ?steps: Integer, ?strict: bool, ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
281
281
  def emulate_media: (?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?forcedColors: ("active" | "none" | "null"), ?media: ("screen" | "print" | "null"), ?reducedMotion: ("reduce" | "no-preference" | "null")) -> void
282
282
  def eval_on_selector: (String selector, String expression, ?arg: untyped, ?strict: bool) -> untyped
283
283
  def eval_on_selector_all: (String selector, String expression, ?arg: untyped) -> untyped
@@ -303,7 +303,7 @@ module Playwright
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
305
  def hide_highlight: -> void
306
- def hover: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
306
+ def hover: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
307
307
  def inner_html: (String selector, ?strict: bool, ?timeout: Float) -> String
308
308
  def inner_text: (String selector, ?strict: bool, ?timeout: Float) -> String
309
309
  def input_value: (String selector, ?strict: bool, ?timeout: Float) -> String
@@ -331,9 +331,9 @@ module Playwright
331
331
  def reload: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
332
332
  def route: ((String | Regexp | function) url, function handler, ?times: Integer) -> untyped
333
333
  def route_from_har: ((String | File) har, ?notFound: ("abort" | "fallback"), ?update: bool, ?updateContent: ("embed" | "attach"), ?updateMode: ("full" | "minimal"), ?url: (String | Regexp)) -> void
334
- 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")) -> String
334
+ 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
335
335
  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]
336
- def set_checked: (String selector, bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
336
+ 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
337
337
  def set_content: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
338
338
  def content=: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
339
339
  def set_default_navigation_timeout: (Float timeout) -> void
@@ -346,11 +346,11 @@ module Playwright
346
346
  def set_viewport_size: (Hash[untyped, untyped] viewportSize) -> void
347
347
  def viewport_size=: (Hash[untyped, untyped] viewportSize) -> void
348
348
  def aria_snapshot: (?boxes: bool, ?depth: Integer, ?mode: ("ai" | "default"), ?timeout: Float) -> String
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
+ def tap_point: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
350
350
  def text_content: (String selector, ?strict: bool, ?timeout: Float) -> (nil | String)
351
351
  def title: -> String
352
352
  def type: (String selector, String text, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
353
- def uncheck: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
353
+ def uncheck: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
354
354
  def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
355
355
  def unroute: ((String | Regexp | function) url, ?handler: function) -> void
356
356
  def url: -> String
@@ -376,6 +376,8 @@ module Playwright
376
376
 
377
377
  attr_reader clock: Clock
378
378
  attr_reader keyboard: Keyboard
379
+ attr_reader local_storage: WebStorage
380
+ attr_reader session_storage: WebStorage
379
381
  attr_reader mouse: Mouse
380
382
  attr_reader request: APIRequestContext
381
383
  attr_reader screencast: untyped
@@ -411,7 +413,7 @@ module Playwright
411
413
  def geolocation=: ((nil | Hash[untyped, untyped]) geolocation) -> void
412
414
  def set_offline: (bool offline) -> void
413
415
  def offline=: (bool offline) -> void
414
- def storage_state: (?indexedDB: bool, ?path: (String | File)) -> Hash[untyped, untyped]
416
+ def storage_state: (?credentials: bool, ?indexedDB: bool, ?path: (String | File)) -> Hash[untyped, untyped]
415
417
  def set_storage_state: (((String | File) | Hash[untyped, untyped]) storageState) -> void
416
418
  def storage_state=: (((String | File) | Hash[untyped, untyped]) storageState) -> void
417
419
  def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
@@ -421,6 +423,7 @@ module Playwright
421
423
  def expect_page: (?predicate: function, ?timeout: Float) { () -> void } -> Page
422
424
 
423
425
  attr_reader clock: Clock
426
+ attr_reader credentials: Credentials
424
427
  attr_reader request: APIRequestContext
425
428
  attr_reader tracing: Tracing
426
429
  end
@@ -447,7 +450,7 @@ module Playwright
447
450
 
448
451
  class BrowserType
449
452
  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
453
+ def connect_over_cdp: (String endpointURL, ?artifactsDir: (String | File), ?headers: Hash[untyped, untyped], ?isLocal: bool, ?noDefaults: bool, ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
451
454
  def executable_path: -> String
452
455
  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
453
456
  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
@@ -482,15 +485,15 @@ module Playwright
482
485
  def aria_snapshot: (?boxes: bool, ?depth: Integer, ?mode: ("ai" | "default"), ?timeout: Float) -> String
483
486
  def blur: (?timeout: Float) -> void
484
487
  def bounding_box: (?timeout: Float) -> (nil | Hash[untyped, untyped])
485
- def check: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
488
+ def check: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
486
489
  def clear: (?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> void
487
- def click: (?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?steps: Integer, ?timeout: Float, ?trial: bool) -> void
490
+ def click: (?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?steps: Integer, ?timeout: Float, ?trial: bool) -> void
488
491
  def count: -> Integer
489
- def dblclick: (?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?steps: Integer, ?timeout: Float, ?trial: bool) -> void
492
+ def dblclick: (?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?steps: Integer, ?timeout: Float, ?trial: bool) -> void
490
493
  def describe: (String description) -> Locator
491
494
  def description: -> (nil | String)
492
495
  def dispatch_event: (String type_, ?eventInit: untyped, ?timeout: Float) -> void
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
496
+ def drag_to: (Locator target, ?force: bool, ?noWaitAfter: bool, ?scroll: ("auto" | "none"), ?sourcePosition: Hash[untyped, untyped], ?steps: Integer, ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
494
497
  def drop: (Hash[untyped, untyped] payload, ?position: Hash[untyped, untyped], ?timeout: Float) -> void
495
498
  def element_handle: (?timeout: Float) -> ElementHandle
496
499
  def element_handles: -> Array[untyped]
@@ -515,7 +518,7 @@ module Playwright
515
518
  def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
516
519
  def hide_highlight: -> void
517
520
  def highlight: (?style: String) -> untyped
518
- def hover: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
521
+ def hover: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
519
522
  def inner_html: (?timeout: Float) -> String
520
523
  def inner_text: (?timeout: Float) -> String
521
524
  def input_value: (?timeout: Float) -> String
@@ -533,19 +536,20 @@ module Playwright
533
536
  def page: -> Page
534
537
  def press: (String key, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
535
538
  def press_sequentially: (String text, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
536
- 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")) -> String
539
+ 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
537
540
  def scroll_into_view_if_needed: (?timeout: Float) -> void
538
541
  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]
539
542
  def select_text: (?force: bool, ?timeout: Float) -> void
540
- def set_checked: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
541
- def checked=: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
543
+ def set_checked: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
544
+ def checked=: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
542
545
  def set_input_files: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
543
546
  def input_files=: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
544
- def tap_point: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
547
+ def tap_point: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
545
548
  def text_content: (?timeout: Float) -> (nil | String)
546
549
  def type: (String text, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
547
- def uncheck: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
550
+ def uncheck: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
548
551
  def wait_for: (?state: ("attached" | "detached" | "visible" | "hidden"), ?timeout: Float) -> void
552
+ def wait_for_function: (String expression, ?arg: untyped, ?timeout: Float) -> void
549
553
  end
550
554
 
551
555
  class FrameLocator
@@ -572,9 +576,12 @@ module Playwright
572
576
  def headers_array: -> Array[untyped]
573
577
  def json: -> untyped
574
578
  def ok: -> bool
579
+ def security_details: -> (nil | Hash[untyped, untyped])
580
+ def server_addr: -> (nil | Hash[untyped, untyped])
575
581
  def status: -> Integer
576
582
  def status_text: -> String
577
583
  def text: -> String
584
+ def timing: -> Hash[untyped, untyped]
578
585
  def url: -> String
579
586
  end
580
587
 
@@ -611,7 +618,7 @@ module Playwright
611
618
  def not_to_have_accessible_description: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
612
619
  def not_to_have_accessible_error_message: ((String | Regexp) errorMessage, ?ignoreCase: bool, ?timeout: Float) -> void
613
620
  def not_to_have_accessible_name: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
614
- def not_to_have_attribute: (String name, (String | Regexp) value, ?ignoreCase: bool, ?timeout: Float) -> void
621
+ def not_to_have_attribute: (String name, ?value: (String | Regexp), ?ignoreCase: bool, ?timeout: Float) -> void
615
622
  def not_to_have_class: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?timeout: Float) -> void
616
623
  def not_to_have_count: (Integer count, ?timeout: Float) -> void
617
624
  def not_to_have_css: (String name, (String | Regexp) value, ?timeout: Float) -> void
@@ -637,7 +644,7 @@ module Playwright
637
644
  def to_have_accessible_description: ((String | Regexp) description, ?ignoreCase: bool, ?timeout: Float) -> void
638
645
  def to_have_accessible_error_message: ((String | Regexp) errorMessage, ?ignoreCase: bool, ?timeout: Float) -> void
639
646
  def to_have_accessible_name: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
640
- def to_have_attribute: (String name, (String | Regexp) value, ?ignoreCase: bool, ?timeout: Float) -> void
647
+ def to_have_attribute: (String name, ?value: (String | Regexp), ?ignoreCase: bool, ?timeout: Float) -> void
641
648
  def to_have_class: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?timeout: Float) -> void
642
649
  def to_have_count: (Integer count, ?timeout: Float) -> void
643
650
  def to_have_css: (String name, (String | Regexp) value, ?pseudo: ("before" | "after"), ?timeout: Float) -> void
@@ -659,5 +666,20 @@ module Playwright
659
666
  def to_have_url: ((String | Regexp) urlOrRegExp, ?ignoreCase: bool, ?timeout: Float) -> void
660
667
  end
661
668
 
669
+ class WebStorage
670
+ def items: -> Array[untyped]
671
+ def get_item: (String name) -> (nil | String)
672
+ def set_item: (String name, String value) -> void
673
+ def remove_item: (String name) -> void
674
+ def clear: -> void
675
+ end
676
+
677
+ class Credentials
678
+ def install: -> void
679
+ def create: (String rpId, ?id: String, ?privateKey: String, ?publicKey: String, ?userHandle: String) -> Hash[untyped, untyped]
680
+ def delete: (String id) -> void
681
+ def get: (?id: String, ?rpId: String) -> Array[untyped]
682
+ end
683
+
662
684
  def self.create: (playwright_cli_executable_path: String) { (Playwright) -> void } -> void
663
685
  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.60.0
4
+ version: 1.62.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
@@ -245,6 +245,7 @@ files:
245
245
  - documentation/docs/api/cdp_session.md
246
246
  - documentation/docs/api/clock.md
247
247
  - documentation/docs/api/console_message.md
248
+ - documentation/docs/api/credentials.md
248
249
  - documentation/docs/api/dialog.md
249
250
  - documentation/docs/api/download.md
250
251
  - documentation/docs/api/element_handle.md
@@ -267,6 +268,7 @@ files:
267
268
  - documentation/docs/api/touchscreen.md
268
269
  - documentation/docs/api/tracing.md
269
270
  - documentation/docs/api/web_socket.md
271
+ - documentation/docs/api/web_storage.md
270
272
  - documentation/docs/api/worker.md
271
273
  - documentation/docs/article/api_coverage.mdx
272
274
  - documentation/docs/article/getting_started.md
@@ -338,6 +340,7 @@ files:
338
340
  - lib/playwright/clock_impl.rb
339
341
  - lib/playwright/connection.rb
340
342
  - lib/playwright/console_message_impl.rb
343
+ - lib/playwright/credentials_impl.rb
341
344
  - lib/playwright/disposable.rb
342
345
  - lib/playwright/download_impl.rb
343
346
  - lib/playwright/errors.rb
@@ -367,6 +370,7 @@ files:
367
370
  - lib/playwright/raw_headers.rb
368
371
  - lib/playwright/route_handler.rb
369
372
  - lib/playwright/screencast.rb
373
+ - lib/playwright/screenshot_utils.rb
370
374
  - lib/playwright/select_option_values.rb
371
375
  - lib/playwright/selectors_impl.rb
372
376
  - lib/playwright/test.rb
@@ -380,6 +384,7 @@ files:
380
384
  - lib/playwright/waiter.rb
381
385
  - lib/playwright/web_socket_client.rb
382
386
  - lib/playwright/web_socket_transport.rb
387
+ - lib/playwright/web_storage_impl.rb
383
388
  - lib/playwright_api/api_request.rb
384
389
  - lib/playwright_api/api_request_context.rb
385
390
  - lib/playwright_api/api_response.rb
@@ -389,6 +394,7 @@ files:
389
394
  - lib/playwright_api/cdp_session.rb
390
395
  - lib/playwright_api/clock.rb
391
396
  - lib/playwright_api/console_message.rb
397
+ - lib/playwright_api/credentials.rb
392
398
  - lib/playwright_api/dialog.rb
393
399
  - lib/playwright_api/download.rb
394
400
  - lib/playwright_api/element_handle.rb
@@ -410,13 +416,17 @@ files:
410
416
  - lib/playwright_api/touchscreen.rb
411
417
  - lib/playwright_api/tracing.rb
412
418
  - lib/playwright_api/web_socket.rb
419
+ - lib/playwright_api/web_storage.rb
413
420
  - lib/playwright_api/worker.rb
414
421
  - playwright.gemspec
415
422
  - sig/playwright.rbs
416
423
  homepage: https://github.com/YusukeIwaki/playwright-ruby-client
417
424
  licenses:
418
425
  - MIT
419
- metadata: {}
426
+ metadata:
427
+ documentation_uri: https://playwright-ruby-client.vercel.app/docs/article/getting_started
428
+ source_code_uri: https://github.com/YusukeIwaki/playwright-ruby-client
429
+ bug_tracker_uri: https://github.com/YusukeIwaki/playwright-ruby-client/issues
420
430
  rdoc_options: []
421
431
  require_paths:
422
432
  - lib
@@ -433,5 +443,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
433
443
  requirements: []
434
444
  rubygems_version: 3.6.9
435
445
  specification_version: 4
436
- summary: The Ruby binding of playwright driver 1.60.0
446
+ summary: The Ruby binding of playwright driver 1.62.1
437
447
  test_files: []