playwright-ruby-client 0.0.8 → 1.58.1.alpha1

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 (209) hide show
  1. checksums.yaml +4 -4
  2. data/AGENTS.md +4 -0
  3. data/CLAUDE/api_generation.md +28 -0
  4. data/CLAUDE/ci_expectations.md +23 -0
  5. data/CLAUDE/gem_release_flow.md +39 -0
  6. data/CLAUDE/past_upgrade_pr_patterns.md +42 -0
  7. data/CLAUDE/playwright_upgrade_workflow.md +35 -0
  8. data/CLAUDE/rspec_debugging.md +30 -0
  9. data/CLAUDE/unimplemented_examples.md +18 -0
  10. data/CLAUDE.md +32 -0
  11. data/CONTRIBUTING.md +5 -0
  12. data/README.md +60 -16
  13. data/documentation/README.md +33 -0
  14. data/documentation/babel.config.js +3 -0
  15. data/documentation/docs/api/api_request.md +7 -0
  16. data/documentation/docs/api/api_request_context.md +298 -0
  17. data/documentation/docs/api/api_response.md +114 -0
  18. data/documentation/docs/api/browser.md +237 -0
  19. data/documentation/docs/api/browser_context.md +503 -0
  20. data/documentation/docs/api/browser_type.md +184 -0
  21. data/documentation/docs/api/cdp_session.md +44 -0
  22. data/documentation/docs/api/clock.md +154 -0
  23. data/documentation/docs/api/console_message.md +85 -0
  24. data/documentation/docs/api/dialog.md +84 -0
  25. data/documentation/docs/api/download.md +111 -0
  26. data/documentation/docs/api/element_handle.md +694 -0
  27. data/documentation/docs/api/experimental/_category_.yml +3 -0
  28. data/documentation/docs/api/experimental/android.md +42 -0
  29. data/documentation/docs/api/experimental/android_device.md +109 -0
  30. data/documentation/docs/api/experimental/android_input.md +43 -0
  31. data/documentation/docs/api/experimental/android_socket.md +7 -0
  32. data/documentation/docs/api/experimental/android_web_view.md +7 -0
  33. data/documentation/docs/api/file_chooser.md +53 -0
  34. data/documentation/docs/api/frame.md +1218 -0
  35. data/documentation/docs/api/frame_locator.md +348 -0
  36. data/documentation/docs/api/js_handle.md +121 -0
  37. data/documentation/docs/api/keyboard.md +170 -0
  38. data/documentation/docs/api/locator.md +1495 -0
  39. data/documentation/docs/api/locator_assertions.md +827 -0
  40. data/documentation/docs/api/mouse.md +86 -0
  41. data/documentation/docs/api/page.md +1946 -0
  42. data/documentation/docs/api/page_assertions.md +65 -0
  43. data/documentation/docs/api/playwright.md +66 -0
  44. data/documentation/docs/api/request.md +255 -0
  45. data/documentation/docs/api/response.md +176 -0
  46. data/documentation/docs/api/route.md +205 -0
  47. data/documentation/docs/api/selectors.md +63 -0
  48. data/documentation/docs/api/touchscreen.md +22 -0
  49. data/documentation/docs/api/tracing.md +129 -0
  50. data/documentation/docs/api/web_socket.md +51 -0
  51. data/documentation/docs/api/worker.md +83 -0
  52. data/documentation/docs/article/api_coverage.mdx +11 -0
  53. data/documentation/docs/article/getting_started.md +161 -0
  54. data/documentation/docs/article/guides/_category_.yml +3 -0
  55. data/documentation/docs/article/guides/download_playwright_driver.md +55 -0
  56. data/documentation/docs/article/guides/inspector.md +31 -0
  57. data/documentation/docs/article/guides/launch_browser.md +121 -0
  58. data/documentation/docs/article/guides/playwright_on_alpine_linux.md +112 -0
  59. data/documentation/docs/article/guides/rails_integration.md +278 -0
  60. data/documentation/docs/article/guides/rails_integration_with_null_driver.md +145 -0
  61. data/documentation/docs/article/guides/recording_video.md +79 -0
  62. data/documentation/docs/article/guides/rspec_integration.md +59 -0
  63. data/documentation/docs/article/guides/semi_automation.md +71 -0
  64. data/documentation/docs/article/guides/use_storage_state.md +78 -0
  65. data/documentation/docs/include/api_coverage.md +671 -0
  66. data/documentation/docusaurus.config.js +114 -0
  67. data/documentation/package.json +39 -0
  68. data/documentation/sidebars.js +15 -0
  69. data/documentation/src/components/HomepageFeatures.js +61 -0
  70. data/documentation/src/components/HomepageFeatures.module.css +13 -0
  71. data/documentation/src/css/custom.css +44 -0
  72. data/documentation/src/pages/index.js +49 -0
  73. data/documentation/src/pages/index.module.css +41 -0
  74. data/documentation/src/pages/markdown-page.md +7 -0
  75. data/documentation/static/.nojekyll +0 -0
  76. data/documentation/static/img/playwright-logo.svg +9 -0
  77. data/documentation/static/img/playwright-ruby-client.png +0 -0
  78. data/documentation/static/img/undraw_dropdown_menu.svg +1 -0
  79. data/documentation/static/img/undraw_web_development.svg +1 -0
  80. data/documentation/static/img/undraw_windows.svg +1 -0
  81. data/documentation/yarn.lock +9005 -0
  82. data/lib/playwright/{input_types/android_input.rb → android_input_impl.rb} +5 -1
  83. data/lib/playwright/api_implementation.rb +18 -0
  84. data/lib/playwright/api_response_impl.rb +77 -0
  85. data/lib/playwright/channel.rb +62 -1
  86. data/lib/playwright/channel_owner.rb +70 -7
  87. data/lib/playwright/channel_owners/android.rb +16 -3
  88. data/lib/playwright/channel_owners/android_device.rb +22 -66
  89. data/lib/playwright/channel_owners/api_request_context.rb +247 -0
  90. data/lib/playwright/channel_owners/artifact.rb +40 -0
  91. data/lib/playwright/channel_owners/binding_call.rb +70 -0
  92. data/lib/playwright/channel_owners/browser.rb +114 -22
  93. data/lib/playwright/channel_owners/browser_context.rb +589 -15
  94. data/lib/playwright/channel_owners/browser_type.rb +90 -1
  95. data/lib/playwright/channel_owners/cdp_session.rb +19 -0
  96. data/lib/playwright/channel_owners/dialog.rb +32 -0
  97. data/lib/playwright/channel_owners/element_handle.rb +107 -43
  98. data/lib/playwright/channel_owners/fetch_request.rb +8 -0
  99. data/lib/playwright/channel_owners/frame.rb +334 -104
  100. data/lib/playwright/channel_owners/js_handle.rb +9 -13
  101. data/lib/playwright/channel_owners/local_utils.rb +82 -0
  102. data/lib/playwright/channel_owners/page.rb +778 -95
  103. data/lib/playwright/channel_owners/playwright.rb +25 -30
  104. data/lib/playwright/channel_owners/request.rb +120 -18
  105. data/lib/playwright/channel_owners/response.rb +113 -0
  106. data/lib/playwright/channel_owners/route.rb +181 -0
  107. data/lib/playwright/channel_owners/stream.rb +30 -0
  108. data/lib/playwright/channel_owners/tracing.rb +117 -0
  109. data/lib/playwright/channel_owners/web_socket.rb +96 -0
  110. data/lib/playwright/channel_owners/worker.rb +46 -0
  111. data/lib/playwright/channel_owners/writable_stream.rb +14 -0
  112. data/lib/playwright/clock_impl.rb +67 -0
  113. data/lib/playwright/connection.rb +111 -63
  114. data/lib/playwright/console_message_impl.rb +29 -0
  115. data/lib/playwright/download_impl.rb +32 -0
  116. data/lib/playwright/errors.rb +42 -5
  117. data/lib/playwright/event_emitter.rb +17 -3
  118. data/lib/playwright/event_emitter_proxy.rb +49 -0
  119. data/lib/playwright/events.rb +10 -5
  120. data/lib/playwright/file_chooser_impl.rb +24 -0
  121. data/lib/playwright/frame_locator_impl.rb +66 -0
  122. data/lib/playwright/har_router.rb +89 -0
  123. data/lib/playwright/http_headers.rb +14 -0
  124. data/lib/playwright/input_files.rb +102 -15
  125. data/lib/playwright/javascript/expression.rb +7 -11
  126. data/lib/playwright/javascript/regex.rb +23 -0
  127. data/lib/playwright/javascript/source_url.rb +16 -0
  128. data/lib/playwright/javascript/value_parser.rb +108 -19
  129. data/lib/playwright/javascript/value_serializer.rb +47 -8
  130. data/lib/playwright/javascript/visitor_info.rb +26 -0
  131. data/lib/playwright/javascript.rb +2 -10
  132. data/lib/playwright/{input_types/keyboard.rb → keyboard_impl.rb} +6 -2
  133. data/lib/playwright/locator_assertions_impl.rb +571 -0
  134. data/lib/playwright/locator_impl.rb +544 -0
  135. data/lib/playwright/locator_utils.rb +136 -0
  136. data/lib/playwright/mouse_impl.rb +57 -0
  137. data/lib/playwright/page_assertions_impl.rb +154 -0
  138. data/lib/playwright/playwright_api.rb +102 -30
  139. data/lib/playwright/raw_headers.rb +61 -0
  140. data/lib/playwright/route_handler.rb +78 -0
  141. data/lib/playwright/select_option_values.rb +34 -13
  142. data/lib/playwright/selectors_impl.rb +45 -0
  143. data/lib/playwright/test.rb +102 -0
  144. data/lib/playwright/timeout_settings.rb +9 -4
  145. data/lib/playwright/touchscreen_impl.rb +14 -0
  146. data/lib/playwright/transport.rb +61 -10
  147. data/lib/playwright/url_matcher.rb +24 -2
  148. data/lib/playwright/utils.rb +48 -13
  149. data/lib/playwright/version.rb +2 -1
  150. data/lib/playwright/video.rb +54 -0
  151. data/lib/playwright/waiter.rb +166 -0
  152. data/lib/playwright/web_socket_client.rb +167 -0
  153. data/lib/playwright/web_socket_transport.rb +116 -0
  154. data/lib/playwright.rb +188 -11
  155. data/lib/playwright_api/android.rb +46 -11
  156. data/lib/playwright_api/android_device.rb +182 -31
  157. data/lib/playwright_api/android_input.rb +22 -13
  158. data/lib/playwright_api/android_socket.rb +18 -0
  159. data/lib/playwright_api/android_web_view.rb +24 -0
  160. data/lib/playwright_api/api_request.rb +26 -0
  161. data/lib/playwright_api/api_request_context.rb +311 -0
  162. data/lib/playwright_api/api_response.rb +92 -0
  163. data/lib/playwright_api/browser.rb +116 -103
  164. data/lib/playwright_api/browser_context.rb +290 -389
  165. data/lib/playwright_api/browser_type.rb +96 -118
  166. data/lib/playwright_api/cdp_session.rb +36 -39
  167. data/lib/playwright_api/clock.rb +121 -0
  168. data/lib/playwright_api/console_message.rb +35 -19
  169. data/lib/playwright_api/dialog.rb +53 -50
  170. data/lib/playwright_api/download.rb +49 -43
  171. data/lib/playwright_api/element_handle.rb +354 -402
  172. data/lib/playwright_api/file_chooser.rb +15 -18
  173. data/lib/playwright_api/frame.rb +703 -603
  174. data/lib/playwright_api/frame_locator.rb +285 -0
  175. data/lib/playwright_api/js_handle.rb +50 -76
  176. data/lib/playwright_api/keyboard.rb +67 -146
  177. data/lib/playwright_api/locator.rb +1304 -0
  178. data/lib/playwright_api/locator_assertions.rb +704 -0
  179. data/lib/playwright_api/mouse.rb +23 -29
  180. data/lib/playwright_api/page.rb +1196 -1176
  181. data/lib/playwright_api/page_assertions.rb +60 -0
  182. data/lib/playwright_api/playwright.rb +54 -122
  183. data/lib/playwright_api/request.rb +112 -74
  184. data/lib/playwright_api/response.rb +92 -20
  185. data/lib/playwright_api/route.rb +152 -62
  186. data/lib/playwright_api/selectors.rb +47 -61
  187. data/lib/playwright_api/touchscreen.rb +8 -2
  188. data/lib/playwright_api/tracing.rb +128 -0
  189. data/lib/playwright_api/web_socket.rb +43 -5
  190. data/lib/playwright_api/worker.rb +74 -34
  191. data/playwright.gemspec +14 -9
  192. data/sig/playwright.rbs +658 -0
  193. metadata +216 -50
  194. data/docs/api_coverage.md +0 -354
  195. data/lib/playwright/channel_owners/chromium_browser.rb +0 -8
  196. data/lib/playwright/channel_owners/chromium_browser_context.rb +0 -8
  197. data/lib/playwright/channel_owners/console_message.rb +0 -21
  198. data/lib/playwright/channel_owners/firefox_browser.rb +0 -8
  199. data/lib/playwright/channel_owners/selectors.rb +0 -4
  200. data/lib/playwright/channel_owners/webkit_browser.rb +0 -8
  201. data/lib/playwright/input_type.rb +0 -19
  202. data/lib/playwright/input_types/mouse.rb +0 -4
  203. data/lib/playwright/input_types/touchscreen.rb +0 -4
  204. data/lib/playwright/javascript/function.rb +0 -67
  205. data/lib/playwright/wait_helper.rb +0 -73
  206. data/lib/playwright_api/accessibility.rb +0 -93
  207. data/lib/playwright_api/binding_call.rb +0 -23
  208. data/lib/playwright_api/chromium_browser_context.rb +0 -57
  209. data/lib/playwright_api/video.rb +0 -24
@@ -0,0 +1,658 @@
1
+ module Playwright
2
+ type function = String
3
+
4
+ class Request
5
+ def all_headers: -> Hash[untyped, untyped]
6
+ def failure: -> (nil | String)
7
+ def frame: -> Frame
8
+ def headers: -> Hash[untyped, untyped]
9
+ def headers_array: -> Array[untyped]
10
+ def header_value: (String name) -> (nil | String)
11
+ def navigation_request?: -> bool
12
+ def method: -> String
13
+ def post_data: -> (nil | String)
14
+ def post_data_buffer: -> (nil | String)
15
+ def post_data_json: -> (nil | untyped)
16
+ def redirected_from: -> (nil | Request)
17
+ def redirected_to: -> (nil | Request)
18
+ def resource_type: -> String
19
+ def response: -> (nil | Response)
20
+ def sizes: -> Hash[untyped, untyped]
21
+ def timing: -> Hash[untyped, untyped]
22
+ def url: -> String
23
+ end
24
+
25
+ class Response
26
+ def all_headers: -> Hash[untyped, untyped]
27
+ def body: -> String
28
+ def finished: -> (nil | String)
29
+ def frame: -> Frame
30
+ def from_service_worker: -> bool
31
+ def headers: -> Hash[untyped, untyped]
32
+ def headers_array: -> Array[untyped]
33
+ def header_value: (String name) -> (nil | String)
34
+ def header_values: (String name) -> Array[untyped]
35
+ def json: -> untyped
36
+ def ok: -> bool
37
+ def request: -> Request
38
+ def security_details: -> (nil | Hash[untyped, untyped])
39
+ def server_addr: -> (nil | Hash[untyped, untyped])
40
+ def status: -> Integer
41
+ def status_text: -> String
42
+ def text: -> String
43
+ def url: -> String
44
+ end
45
+
46
+ class Route
47
+ def abort: (?errorCode: String) -> void
48
+ def continue: (?headers: Hash[untyped, untyped], ?method: String, ?postData: (String | String | untyped), ?url: String) -> void
49
+ def fallback: (?headers: Hash[untyped, untyped], ?method: String, ?postData: (String | String | untyped), ?url: String) -> void
50
+ def fetch: (?headers: Hash[untyped, untyped], ?maxRedirects: Integer, ?maxRetries: Integer, ?method: String, ?postData: (String | String | untyped), ?timeout: Float, ?url: String) -> APIResponse
51
+ def fulfill: (?body: (String | String), ?contentType: String, ?headers: Hash[untyped, untyped], ?json: untyped, ?path: (String | File), ?response: APIResponse, ?status: Integer) -> void
52
+ def request: -> Request
53
+ end
54
+
55
+ class WebSocket
56
+ def closed?: -> bool
57
+ def url: -> String
58
+ def expect_event: (String event, ?predicate: function, ?timeout: Float) { () -> void } -> untyped
59
+ def wait_for_event: (String event, ?predicate: function, ?timeout: Float) ?{ (untyped) -> untyped } -> untyped
60
+ end
61
+
62
+ class Keyboard
63
+ def down: (String key) -> void
64
+ def insert_text: (String text) -> void
65
+ def press: (String key, ?delay: Float) -> void
66
+ def type: (String text, ?delay: Float) -> void
67
+ def up: (String key) -> void
68
+ end
69
+
70
+ class Mouse
71
+ def click: (Float x, Float y, ?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float) -> void
72
+ def dblclick: (Float x, Float y, ?button: ("left" | "right" | "middle"), ?delay: Float) -> void
73
+ def down: (?button: ("left" | "right" | "middle"), ?clickCount: Integer) -> void
74
+ def move: (Float x, Float y, ?steps: Integer) -> void
75
+ def up: (?button: ("left" | "right" | "middle"), ?clickCount: Integer) -> void
76
+ def wheel: (Float deltaX, Float deltaY) -> void
77
+ end
78
+
79
+ class Touchscreen
80
+ def tap_point: (Float x, Float y) -> void
81
+ end
82
+
83
+ class JSHandle
84
+ def as_element: -> (nil | ElementHandle)
85
+ def dispose: -> void
86
+ def evaluate: (String expression, ?arg: untyped) -> untyped
87
+ def evaluate_handle: (String expression, ?arg: untyped) -> JSHandle
88
+ def get_properties: -> Hash[untyped, untyped]
89
+ def properties: -> Hash[untyped, untyped]
90
+ def get_property: (String propertyName) -> JSHandle
91
+ def json_value: -> untyped
92
+ end
93
+
94
+ class ElementHandle < JSHandle
95
+ def bounding_box: -> (nil | Hash[untyped, untyped])
96
+ def check: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
97
+ 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 content_frame: -> (nil | Frame)
99
+ 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
100
+ def dispatch_event: (String type_, ?eventInit: untyped) -> void
101
+ def eval_on_selector: (String selector, String expression, ?arg: untyped) -> untyped
102
+ def eval_on_selector_all: (String selector, String expression, ?arg: untyped) -> untyped
103
+ def fill: (String value, ?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> void
104
+ def focus: -> void
105
+ def get_attribute: (String name) -> (nil | String)
106
+ def []: (String name) -> (nil | String)
107
+ def hover: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
108
+ def inner_html: -> String
109
+ def inner_text: -> String
110
+ def input_value: (?timeout: Float) -> String
111
+ def checked?: -> bool
112
+ def disabled?: -> bool
113
+ def editable?: -> bool
114
+ def enabled?: -> bool
115
+ def hidden?: -> bool
116
+ def visible?: -> bool
117
+ def owner_frame: -> (nil | Frame)
118
+ def press: (String key, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
119
+ def query_selector: (String selector) -> (nil | ElementHandle)
120
+ def query_selector_all: (String selector) -> Array[untyped]
121
+ 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
122
+ def scroll_into_view_if_needed: (?timeout: Float) -> void
123
+ 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]
124
+ def select_text: (?force: bool, ?timeout: Float) -> void
125
+ def set_checked: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
126
+ def checked=: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
127
+ def set_input_files: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
128
+ def input_files=: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
129
+ def tap_point: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
130
+ def text_content: -> (nil | String)
131
+ def type: (String text, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
132
+ def uncheck: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
133
+ def wait_for_element_state: (("visible" | "hidden" | "stable" | "enabled" | "disabled" | "editable") state, ?timeout: Float) -> void
134
+ def wait_for_selector: (String selector, ?state: ("attached" | "detached" | "visible" | "hidden"), ?strict: bool, ?timeout: Float) -> (nil | ElementHandle)
135
+ end
136
+
137
+ class FileChooser
138
+ def element: -> ElementHandle
139
+ def multiple?: -> bool
140
+ def page: -> Page
141
+ def set_files: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
142
+ def files=: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
143
+ end
144
+
145
+ class Frame
146
+ def add_script_tag: (?content: String, ?path: (String | File), ?type: String, ?url: String) -> ElementHandle
147
+ def add_style_tag: (?content: String, ?path: (String | File), ?url: String) -> ElementHandle
148
+ def check: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
149
+ def child_frames: -> Array[untyped]
150
+ 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
151
+ def content: -> String
152
+ 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
153
+ def dispatch_event: (String selector, String type_, ?eventInit: untyped, ?strict: bool, ?timeout: Float) -> void
154
+ 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
155
+ def eval_on_selector: (String selector, String expression, ?arg: untyped, ?strict: bool) -> untyped
156
+ def eval_on_selector_all: (String selector, String expression, ?arg: untyped) -> untyped
157
+ def evaluate: (String expression, ?arg: untyped) -> untyped
158
+ def evaluate_handle: (String expression, ?arg: untyped) -> JSHandle
159
+ def fill: (String selector, String value, ?force: bool, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
160
+ def focus: (String selector, ?strict: bool, ?timeout: Float) -> void
161
+ def frame_element: -> ElementHandle
162
+ def frame_locator: (String selector) -> FrameLocator
163
+ def get_attribute: (String selector, String name, ?strict: bool, ?timeout: Float) -> (nil | String)
164
+ def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
165
+ def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
166
+ def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
167
+ 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
168
+ def get_by_test_id: ((String | Regexp) testId) -> Locator
169
+ def get_by_testid: ((String | Regexp) testId) -> Locator
170
+ def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
171
+ def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
172
+ def goto: (String url, ?referer: String, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
173
+ def hover: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
174
+ def inner_html: (String selector, ?strict: bool, ?timeout: Float) -> String
175
+ def inner_text: (String selector, ?strict: bool, ?timeout: Float) -> String
176
+ def input_value: (String selector, ?strict: bool, ?timeout: Float) -> String
177
+ def checked?: (String selector, ?strict: bool, ?timeout: Float) -> bool
178
+ def detached?: -> bool
179
+ def disabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
180
+ def editable?: (String selector, ?strict: bool, ?timeout: Float) -> bool
181
+ def enabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
182
+ def hidden?: (String selector, ?strict: bool, ?timeout: Float) -> bool
183
+ def visible?: (String selector, ?strict: bool, ?timeout: Float) -> bool
184
+ def locator: (String selector, ?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
185
+ def name: -> String
186
+ def page: -> Page
187
+ def parent_frame: -> (nil | Frame)
188
+ def press: (String selector, String key, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
189
+ def query_selector: (String selector, ?strict: bool) -> (nil | ElementHandle)
190
+ def query_selector_all: (String selector) -> Array[untyped]
191
+ 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]
192
+ def set_checked: (String selector, bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
193
+ def set_content: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
194
+ def content=: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
195
+ def set_input_files: (String selector, ((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
196
+ def tap_point: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
197
+ def text_content: (String selector, ?strict: bool, ?timeout: Float) -> (nil | String)
198
+ def title: -> String
199
+ def type: (String selector, String text, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
200
+ def uncheck: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
201
+ def url: -> String
202
+ def wait_for_function: (String expression, ?arg: untyped, ?polling: (Float | "raf"), ?timeout: Float) -> JSHandle
203
+ def wait_for_load_state: (?state: ("load" | "domcontentloaded" | "networkidle"), ?timeout: Float) -> void
204
+ def expect_navigation: (?timeout: Float, ?url: (String | Regexp | function), ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) { () -> void } -> (nil | Response)
205
+ def wait_for_selector: (String selector, ?state: ("attached" | "detached" | "visible" | "hidden"), ?strict: bool, ?timeout: Float) -> (nil | ElementHandle)
206
+ def wait_for_timeout: (Float timeout) -> void
207
+ def wait_for_url: ((String | Regexp | function) url, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
208
+ end
209
+
210
+ class Worker
211
+ def evaluate: (String expression, ?arg: untyped) -> untyped
212
+ def evaluate_handle: (String expression, ?arg: untyped) -> JSHandle
213
+ def url: -> String
214
+ def expect_event: (String event, ?predicate: function, ?timeout: Float) { () -> void } -> untyped
215
+ end
216
+
217
+ class Selectors
218
+ def register: (String name, ?script: String, ?contentScript: bool, ?path: (String | File)) -> void
219
+ def set_test_id_attribute: (String attributeName) -> void
220
+ def test_id_attribute=: (String attributeName) -> void
221
+ end
222
+
223
+ class Clock
224
+ def fast_forward: ((Integer | String) ticks) -> void
225
+ def install: (?time: (Float | String | Time)) -> void
226
+ def run_for: ((Integer | String) ticks) -> void
227
+ def pause_at: ((Float | String | Time) time) -> void
228
+ def resume: -> void
229
+ def set_fixed_time: ((Float | String | Time) time) -> void
230
+ def fixed_time=: ((Float | String | Time) time) -> void
231
+ def set_system_time: ((Float | String | Time) time) -> void
232
+ def system_time=: ((Float | String | Time) time) -> void
233
+ end
234
+
235
+ class ConsoleMessage
236
+ def args: -> Array[untyped]
237
+ def location: -> Hash[untyped, untyped]
238
+ def page: -> (nil | Page)
239
+ def text: -> String
240
+ def type: -> ("log" | "debug" | "info" | "error" | "warning" | "dir" | "dirxml" | "table" | "trace" | "clear" | "startGroup" | "startGroupCollapsed" | "endGroup" | "assert" | "profile" | "profileEnd" | "count" | "time" | "timeEnd")
241
+ def worker: -> (nil | Worker)
242
+ end
243
+
244
+ class Dialog
245
+ def accept: (?promptText: String) -> void
246
+ def default_value: -> String
247
+ def dismiss: -> void
248
+ def message: -> String
249
+ def page: -> (nil | Page)
250
+ def type: -> String
251
+ end
252
+
253
+ class Download
254
+ def cancel: -> void
255
+ def delete: -> void
256
+ def failure: -> (nil | String)
257
+ def page: -> Page
258
+ def path: -> (String | File)
259
+ def save_as: ((String | File) path) -> void
260
+ def suggested_filename: -> String
261
+ def url: -> String
262
+ end
263
+
264
+ class Page
265
+ def add_init_script: (?path: (String | File), ?script: String) -> void
266
+ def add_script_tag: (?content: String, ?path: (String | File), ?type: String, ?url: String) -> ElementHandle
267
+ def add_style_tag: (?content: String, ?path: (String | File), ?url: String) -> ElementHandle
268
+ def bring_to_front: -> void
269
+ def check: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
270
+ 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
271
+ def close: (?reason: String, ?runBeforeUnload: bool) -> void
272
+ def content: -> String
273
+ def context: -> BrowserContext
274
+ 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
275
+ def dispatch_event: (String selector, String type_, ?eventInit: untyped, ?strict: bool, ?timeout: Float) -> void
276
+ 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
277
+ 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
278
+ def eval_on_selector: (String selector, String expression, ?arg: untyped, ?strict: bool) -> untyped
279
+ def eval_on_selector_all: (String selector, String expression, ?arg: untyped) -> untyped
280
+ def evaluate: (String expression, ?arg: untyped) -> untyped
281
+ def evaluate_handle: (String expression, ?arg: untyped) -> JSHandle
282
+ def expose_binding: (String name, function callback, ?handle: bool) -> void
283
+ def expose_function: (String name, function callback) -> void
284
+ def fill: (String selector, String value, ?force: bool, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
285
+ def focus: (String selector, ?strict: bool, ?timeout: Float) -> void
286
+ def frame: (?name: String, ?url: (String | Regexp | function)) -> (nil | Frame)
287
+ def frame_locator: (String selector) -> FrameLocator
288
+ def frames: -> Array[untyped]
289
+ def get_attribute: (String selector, String name, ?strict: bool, ?timeout: Float) -> (nil | String)
290
+ def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
291
+ def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
292
+ def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
293
+ 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
294
+ def get_by_test_id: ((String | Regexp) testId) -> Locator
295
+ def get_by_testid: ((String | Regexp) testId) -> Locator
296
+ def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
297
+ def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
298
+ def go_back: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
299
+ def go_forward: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
300
+ def goto: (String url, ?referer: String, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
301
+ def hover: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
302
+ def inner_html: (String selector, ?strict: bool, ?timeout: Float) -> String
303
+ def inner_text: (String selector, ?strict: bool, ?timeout: Float) -> String
304
+ def input_value: (String selector, ?strict: bool, ?timeout: Float) -> String
305
+ def checked?: (String selector, ?strict: bool, ?timeout: Float) -> bool
306
+ def closed?: -> bool
307
+ def disabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
308
+ def editable?: (String selector, ?strict: bool, ?timeout: Float) -> bool
309
+ def enabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
310
+ def hidden?: (String selector, ?strict: bool, ?timeout: Float) -> bool
311
+ def visible?: (String selector, ?strict: bool, ?timeout: Float) -> bool
312
+ def console_messages: -> Array[untyped]
313
+ def page_errors: -> Array[untyped]
314
+ def locator: (String selector, ?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
315
+ def main_frame: -> Frame
316
+ def opener: -> (nil | Page)
317
+ def pause: -> void
318
+ def pdf: (?displayHeaderFooter: bool, ?footerTemplate: String, ?format: String, ?headerTemplate: String, ?height: (String | Float), ?landscape: bool, ?margin: Hash[untyped, untyped], ?outline: bool, ?pageRanges: String, ?path: (String | File), ?preferCSSPageSize: bool, ?printBackground: bool, ?scale: Float, ?tagged: bool, ?width: (String | Float)) -> String
319
+ def press: (String selector, String key, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
320
+ def query_selector: (String selector, ?strict: bool) -> (nil | ElementHandle)
321
+ def query_selector_all: (String selector) -> Array[untyped]
322
+ def requests: -> Array[untyped]
323
+ def reload: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
324
+ def route: ((String | Regexp | function) url, function handler, ?times: Integer) -> void
325
+ def route_from_har: ((String | File) har, ?notFound: ("abort" | "fallback"), ?update: bool, ?updateContent: ("embed" | "attach"), ?updateMode: ("full" | "minimal"), ?url: (String | Regexp)) -> void
326
+ 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
327
+ 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]
328
+ def set_checked: (String selector, bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
329
+ def set_content: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
330
+ def content=: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
331
+ def set_default_navigation_timeout: (Float timeout) -> void
332
+ def default_navigation_timeout=: (Float timeout) -> void
333
+ def set_default_timeout: (Float timeout) -> void
334
+ def default_timeout=: (Float timeout) -> void
335
+ def set_extra_http_headers: (Hash[untyped, untyped] headers) -> void
336
+ def extra_http_headers=: (Hash[untyped, untyped] headers) -> void
337
+ def set_input_files: (String selector, ((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
338
+ def set_viewport_size: (Hash[untyped, untyped] viewportSize) -> void
339
+ def viewport_size=: (Hash[untyped, untyped] viewportSize) -> void
340
+ def tap_point: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
341
+ def text_content: (String selector, ?strict: bool, ?timeout: Float) -> (nil | String)
342
+ def title: -> String
343
+ def type: (String selector, String text, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
344
+ def uncheck: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
345
+ def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
346
+ def unroute: ((String | Regexp | function) url, ?handler: function) -> void
347
+ def url: -> String
348
+ def video: -> (nil | untyped)
349
+ def viewport_size: -> (nil | Hash[untyped, untyped])
350
+ def expect_console_message: (?predicate: function, ?timeout: Float) { () -> void } -> ConsoleMessage
351
+ def expect_download: (?predicate: function, ?timeout: Float) { () -> void } -> Download
352
+ def expect_event: (String event, ?predicate: function, ?timeout: Float) { () -> void } -> untyped
353
+ def expect_file_chooser: (?predicate: function, ?timeout: Float) { () -> void } -> FileChooser
354
+ def wait_for_function: (String expression, ?arg: untyped, ?polling: (Float | "raf"), ?timeout: Float) -> JSHandle
355
+ def wait_for_load_state: (?state: ("load" | "domcontentloaded" | "networkidle"), ?timeout: Float) -> void
356
+ def expect_navigation: (?timeout: Float, ?url: (String | Regexp | function), ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) { () -> void } -> (nil | Response)
357
+ def expect_popup: (?predicate: function, ?timeout: Float) { () -> void } -> Page
358
+ def expect_request: ((String | Regexp | function) urlOrPredicate, ?timeout: Float) { () -> void } -> Request
359
+ def expect_request_finished: (?predicate: function, ?timeout: Float) { () -> void } -> Request
360
+ def expect_response: ((String | Regexp | function) urlOrPredicate, ?timeout: Float) { () -> void } -> Response
361
+ def wait_for_selector: (String selector, ?state: ("attached" | "detached" | "visible" | "hidden"), ?strict: bool, ?timeout: Float) -> (nil | ElementHandle)
362
+ def wait_for_timeout: (Float timeout) -> void
363
+ def wait_for_url: ((String | Regexp | function) url, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
364
+ def expect_websocket: (?predicate: function, ?timeout: Float) { () -> void } -> WebSocket
365
+ def expect_worker: (?predicate: function, ?timeout: Float) { () -> void } -> Worker
366
+ def workers: -> Array[untyped]
367
+
368
+ attr_reader clock: Clock
369
+ attr_reader keyboard: Keyboard
370
+ attr_reader mouse: Mouse
371
+ attr_reader request: APIRequestContext
372
+ attr_reader touchscreen: Touchscreen
373
+ end
374
+
375
+ class BrowserContext
376
+ def add_cookies: (Array[untyped] cookies) -> void
377
+ def add_init_script: (?path: (String | File), ?script: String) -> void
378
+ def background_pages: -> Array[untyped]
379
+ def browser: -> (nil | Browser)
380
+ def clear_cookies: (?domain: (String | Regexp), ?name: (String | Regexp), ?path: (String | Regexp)) -> void
381
+ def clear_permissions: -> void
382
+ def close: (?reason: String) -> void
383
+ def cookies: (?urls: (String | Array[untyped])) -> Array[untyped]
384
+ def expose_binding: (String name, function callback, ?handle: bool) -> void
385
+ def expose_function: (String name, function callback) -> void
386
+ def grant_permissions: (Array[untyped] permissions, ?origin: String) -> void
387
+ def new_cdp_session: ((Page | Frame) page) -> CDPSession
388
+ def new_page: () ?{ (Page) -> untyped } -> Page
389
+ def pages: -> Array[untyped]
390
+ def route: ((String | Regexp | function) url, function handler, ?times: Integer) -> void
391
+ def route_from_har: ((String | File) har, ?notFound: ("abort" | "fallback"), ?update: bool, ?updateContent: ("embed" | "attach"), ?updateMode: ("full" | "minimal"), ?url: (String | Regexp)) -> void
392
+ def service_workers: -> Array[untyped]
393
+ def set_default_navigation_timeout: (Float timeout) -> void
394
+ def default_navigation_timeout=: (Float timeout) -> void
395
+ def set_default_timeout: (Float timeout) -> void
396
+ def default_timeout=: (Float timeout) -> void
397
+ def set_extra_http_headers: (Hash[untyped, untyped] headers) -> void
398
+ def extra_http_headers=: (Hash[untyped, untyped] headers) -> void
399
+ def set_geolocation: ((nil | Hash[untyped, untyped]) geolocation) -> void
400
+ def geolocation=: ((nil | Hash[untyped, untyped]) geolocation) -> void
401
+ def set_offline: (bool offline) -> void
402
+ def offline=: (bool offline) -> void
403
+ def storage_state: (?indexedDB: bool, ?path: (String | File)) -> Hash[untyped, untyped]
404
+ def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
405
+ def unroute: ((String | Regexp | function) url, ?handler: function) -> void
406
+ def expect_console_message: (?predicate: function, ?timeout: Float) { () -> void } -> ConsoleMessage
407
+ def expect_event: (String event, ?predicate: function, ?timeout: Float) { () -> void } -> untyped
408
+ def expect_page: (?predicate: function, ?timeout: Float) { () -> void } -> Page
409
+
410
+ attr_reader clock: Clock
411
+ attr_reader request: APIRequestContext
412
+ attr_reader tracing: Tracing
413
+ end
414
+
415
+ class CDPSession
416
+ def detach: -> void
417
+ def send_message: (String method, ?params: Hash[untyped, untyped]) -> Hash[untyped, untyped]
418
+ end
419
+
420
+ class Browser
421
+ def browser_type: -> BrowserType
422
+ def close: (?reason: String) -> void
423
+ def contexts: -> Array[untyped]
424
+ def connected?: -> bool
425
+ def new_browser_cdp_session: -> CDPSession
426
+ 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
427
+ 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
428
+ def start_tracing: (?page: Page, ?categories: Array[untyped], ?path: (String | File), ?screenshots: bool) -> void
429
+ def stop_tracing: -> String
430
+ def version: -> String
431
+ end
432
+
433
+ class BrowserType
434
+ def connect_over_cdp: (String endpointURL, ?headers: Hash[untyped, untyped], ?isLocal: bool, ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
435
+ def executable_path: -> String
436
+ def launch: (?args: Array[untyped], ?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
437
+ def launch_persistent_context: ((String | File) userDataDir, ?acceptDownloads: bool, ?args: Array[untyped], ?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
438
+ def name: -> String
439
+ end
440
+
441
+ class Playwright
442
+ attr_reader chromium: BrowserType
443
+ attr_reader devices: Hash[untyped, untyped]
444
+ attr_reader firefox: BrowserType
445
+ attr_reader selectors: Selectors
446
+ attr_reader webkit: BrowserType
447
+ end
448
+
449
+ class Tracing
450
+ def start: (?name: String, ?screenshots: bool, ?snapshots: bool, ?sources: bool, ?title: String) -> void
451
+ def start_chunk: (?name: String, ?title: String) -> void
452
+ def group: (String name, ?location: Hash[untyped, untyped]) -> void
453
+ def group_end: -> void
454
+ def stop: (?path: (String | File)) -> void
455
+ def stop_chunk: (?path: (String | File)) -> void
456
+ end
457
+
458
+ class Locator
459
+ def all: -> Array[untyped]
460
+ def all_inner_texts: -> Array[untyped]
461
+ def all_text_contents: -> Array[untyped]
462
+ def and: (Locator locator) -> Locator
463
+ def aria_snapshot: (?timeout: Float) -> String
464
+ def blur: (?timeout: Float) -> void
465
+ def bounding_box: (?timeout: Float) -> (nil | Hash[untyped, untyped])
466
+ def check: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
467
+ def clear: (?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> void
468
+ 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
469
+ def count: -> Integer
470
+ 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
471
+ def describe: (String description) -> Locator
472
+ def description: -> (nil | String)
473
+ def dispatch_event: (String type_, ?eventInit: untyped, ?timeout: Float) -> void
474
+ def drag_to: (Locator target, ?force: bool, ?noWaitAfter: bool, ?sourcePosition: Hash[untyped, untyped], ?steps: Integer, ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
475
+ def element_handle: (?timeout: Float) -> ElementHandle
476
+ def element_handles: -> Array[untyped]
477
+ def content_frame: -> FrameLocator
478
+ def evaluate: (String expression, ?arg: untyped, ?timeout: Float) -> untyped
479
+ def evaluate_all: (String expression, ?arg: untyped) -> untyped
480
+ def evaluate_handle: (String expression, ?arg: untyped, ?timeout: Float) -> JSHandle
481
+ def fill: (String value, ?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> void
482
+ def filter: (?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp), ?visible: bool) -> Locator
483
+ def first: -> Locator
484
+ def focus: (?timeout: Float) -> void
485
+ def frame_locator: (String selector) -> FrameLocator
486
+ def get_attribute: (String name, ?timeout: Float) -> (nil | String)
487
+ def []: (String name, ?timeout: Float) -> (nil | String)
488
+ def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
489
+ def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
490
+ def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
491
+ 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
492
+ def get_by_test_id: ((String | Regexp) testId) -> Locator
493
+ def get_by_testid: ((String | Regexp) testId) -> Locator
494
+ def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
495
+ def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
496
+ def highlight: -> void
497
+ def hover: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
498
+ def inner_html: (?timeout: Float) -> String
499
+ def inner_text: (?timeout: Float) -> String
500
+ def input_value: (?timeout: Float) -> String
501
+ def checked?: (?timeout: Float) -> bool
502
+ def disabled?: (?timeout: Float) -> bool
503
+ def editable?: (?timeout: Float) -> bool
504
+ def enabled?: (?timeout: Float) -> bool
505
+ def hidden?: (?timeout: Float) -> bool
506
+ def visible?: (?timeout: Float) -> bool
507
+ def last: -> Locator
508
+ def locator: ((String | Locator) selectorOrLocator, ?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
509
+ def nth: (Integer index) -> Locator
510
+ def or: (Locator locator) -> Locator
511
+ def page: -> Page
512
+ def press: (String key, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
513
+ def press_sequentially: (String text, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
514
+ 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
515
+ def scroll_into_view_if_needed: (?timeout: Float) -> void
516
+ 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]
517
+ def select_text: (?force: bool, ?timeout: Float) -> void
518
+ def set_checked: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
519
+ def checked=: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
520
+ def set_input_files: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
521
+ def input_files=: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
522
+ def tap_point: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
523
+ def text_content: (?timeout: Float) -> (nil | String)
524
+ def type: (String text, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
525
+ def uncheck: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
526
+ def wait_for: (?state: ("attached" | "detached" | "visible" | "hidden"), ?timeout: Float) -> void
527
+ end
528
+
529
+ class FrameLocator
530
+ def first: -> FrameLocator
531
+ def frame_locator: (String selector) -> FrameLocator
532
+ def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
533
+ def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
534
+ def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
535
+ 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
536
+ def get_by_test_id: ((String | Regexp) testId) -> Locator
537
+ def get_by_testid: ((String | Regexp) testId) -> Locator
538
+ def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
539
+ def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
540
+ def last: -> FrameLocator
541
+ def locator: ((String | Locator) selectorOrLocator, ?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
542
+ def nth: (Integer index) -> FrameLocator
543
+ def owner: -> Locator
544
+ end
545
+
546
+ class APIResponse
547
+ def body: -> String
548
+ def dispose: -> void
549
+ def headers: -> Hash[untyped, untyped]
550
+ def headers_array: -> Array[untyped]
551
+ def json: -> untyped
552
+ def ok: -> bool
553
+ def status: -> Integer
554
+ def status_text: -> String
555
+ def text: -> String
556
+ def url: -> String
557
+ end
558
+
559
+ class APIRequestContext
560
+ 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
561
+ def dispose: (?reason: String) -> void
562
+ 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
563
+ 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
564
+ 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
565
+ 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
566
+ 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
567
+ 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
568
+ end
569
+
570
+ class LocatorAssertions
571
+ def not_to_be_attached: (?attached: bool, ?timeout: Float) -> void
572
+ def not_to_be_checked: (?timeout: Float) -> void
573
+ def not_to_be_disabled: (?timeout: Float) -> void
574
+ def not_to_be_editable: (?editable: bool, ?timeout: Float) -> void
575
+ def not_to_be_empty: (?timeout: Float) -> void
576
+ def not_to_be_enabled: (?enabled: bool, ?timeout: Float) -> void
577
+ def not_to_be_focused: (?timeout: Float) -> void
578
+ def not_to_be_hidden: (?timeout: Float) -> void
579
+ def not_to_be_in_viewport: (?ratio: Float, ?timeout: Float) -> void
580
+ def not_to_be_visible: (?timeout: Float, ?visible: bool) -> void
581
+ def not_to_contain_class: ((String | Array[untyped]) expected, ?timeout: Float) -> void
582
+ def not_to_contain_text: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?ignoreCase: bool, ?timeout: Float, ?useInnerText: bool) -> void
583
+ def not_to_have_accessible_description: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
584
+ def not_to_have_accessible_error_message: ((String | Regexp) errorMessage, ?ignoreCase: bool, ?timeout: Float) -> void
585
+ def not_to_have_accessible_name: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
586
+ def not_to_have_attribute: (String name, (String | Regexp) value, ?ignoreCase: bool, ?timeout: Float) -> void
587
+ def not_to_have_class: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?timeout: Float) -> void
588
+ def not_to_have_count: (Integer count, ?timeout: Float) -> void
589
+ def not_to_have_css: (String name, (String | Regexp) value, ?timeout: Float) -> void
590
+ def not_to_have_id: ((String | Regexp) id, ?timeout: Float) -> void
591
+ def not_to_have_js_property: (String name, untyped value, ?timeout: Float) -> void
592
+ def not_to_have_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?timeout: Float) -> void
593
+ def not_to_have_text: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?ignoreCase: bool, ?timeout: Float, ?useInnerText: bool) -> void
594
+ def not_to_have_value: ((String | Regexp) value, ?timeout: Float) -> void
595
+ def not_to_have_values: ((Array[untyped] | Array[untyped] | Array[untyped]) values, ?timeout: Float) -> void
596
+ def not_to_match_aria_snapshot: (String expected, ?timeout: Float) -> void
597
+ def to_be_attached: (?attached: bool, ?timeout: Float) -> void
598
+ def to_be_checked: (?checked: bool, ?indeterminate: bool, ?timeout: Float) -> void
599
+ def to_be_disabled: (?timeout: Float) -> void
600
+ def to_be_editable: (?editable: bool, ?timeout: Float) -> void
601
+ def to_be_empty: (?timeout: Float) -> void
602
+ def to_be_enabled: (?enabled: bool, ?timeout: Float) -> void
603
+ def to_be_focused: (?timeout: Float) -> void
604
+ def to_be_hidden: (?timeout: Float) -> void
605
+ def to_be_in_viewport: (?ratio: Float, ?timeout: Float) -> void
606
+ def to_be_visible: (?timeout: Float, ?visible: bool) -> void
607
+ def to_contain_class: ((String | Array[untyped]) expected, ?timeout: Float) -> void
608
+ def to_contain_text: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?ignoreCase: bool, ?timeout: Float, ?useInnerText: bool) -> void
609
+ def to_have_accessible_description: ((String | Regexp) description, ?ignoreCase: bool, ?timeout: Float) -> void
610
+ def to_have_accessible_error_message: ((String | Regexp) errorMessage, ?ignoreCase: bool, ?timeout: Float) -> void
611
+ def to_have_accessible_name: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
612
+ def to_have_attribute: (String name, (String | Regexp) value, ?ignoreCase: bool, ?timeout: Float) -> void
613
+ def to_have_class: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?timeout: Float) -> void
614
+ def to_have_count: (Integer count, ?timeout: Float) -> void
615
+ def to_have_css: (String name, (String | Regexp) value, ?timeout: Float) -> void
616
+ def to_have_id: ((String | Regexp) id, ?timeout: Float) -> void
617
+ def to_have_js_property: (String name, untyped value, ?timeout: Float) -> void
618
+ 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
619
+ def to_have_text: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?ignoreCase: bool, ?timeout: Float, ?useInnerText: bool) -> void
620
+ def to_have_value: ((String | Regexp) value, ?timeout: Float) -> void
621
+ def to_have_values: ((Array[untyped] | Array[untyped] | Array[untyped]) values, ?timeout: Float) -> void
622
+ def to_match_aria_snapshot: (String expected, ?timeout: Float) -> void
623
+ end
624
+
625
+ class PageAssertions
626
+ def not_to_have_title: ((String | Regexp) titleOrRegExp, ?timeout: Float) -> void
627
+ def not_to_have_url: ((String | Regexp) urlOrRegExp, ?ignoreCase: bool, ?timeout: Float) -> void
628
+ def to_have_title: ((String | Regexp) titleOrRegExp, ?timeout: Float) -> void
629
+ def to_have_url: ((String | Regexp) urlOrRegExp, ?ignoreCase: bool, ?timeout: Float) -> void
630
+ end
631
+
632
+ class Android
633
+ def devices: (?host: String, ?omitDriverInstall: bool, ?port: Integer) -> Array[untyped]
634
+ def set_default_timeout: (Float timeout) -> void
635
+ def default_timeout=: (Float timeout) -> void
636
+ end
637
+
638
+ class AndroidDevice
639
+ def close: -> void
640
+ def info: (untyped selector) -> untyped
641
+ 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
642
+ def model: -> String
643
+ def screenshot: (?path: (String | File)) -> String
644
+ def serial: -> String
645
+ def shell: (String command) -> String
646
+
647
+ attr_reader input: AndroidInput
648
+ end
649
+
650
+ class AndroidInput
651
+ def drag: (Hash[untyped, untyped] from, Hash[untyped, untyped] to, Integer steps) -> void
652
+ def press: (untyped key) -> void
653
+ def tap_point: (Hash[untyped, untyped] point) -> void
654
+ def type: (String text) -> void
655
+ end
656
+
657
+ def self.create: (playwright_cli_executable_path: String) { (Playwright) -> void } -> void
658
+ end