playwright-ruby-client 1.28.1 → 1.29.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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/documentation/docs/api/accessibility.md +9 -14
  3. data/documentation/docs/api/api_request_context.md +44 -41
  4. data/documentation/docs/api/api_response.md +13 -3
  5. data/documentation/docs/api/browser.md +24 -23
  6. data/documentation/docs/api/browser_context.md +71 -45
  7. data/documentation/docs/api/browser_type.md +21 -14
  8. data/documentation/docs/api/cdp_session.md +3 -5
  9. data/documentation/docs/api/console_message.md +7 -4
  10. data/documentation/docs/api/dialog.md +9 -5
  11. data/documentation/docs/api/download.md +19 -11
  12. data/documentation/docs/api/element_handle.md +125 -116
  13. data/documentation/docs/api/experimental/android.md +4 -5
  14. data/documentation/docs/api/experimental/android_device.md +11 -2
  15. data/documentation/docs/api/experimental/android_input.md +5 -0
  16. data/documentation/docs/api/file_chooser.md +6 -3
  17. data/documentation/docs/api/frame.md +182 -171
  18. data/documentation/docs/api/frame_locator.md +27 -38
  19. data/documentation/docs/api/js_handle.md +16 -10
  20. data/documentation/docs/api/keyboard.md +29 -16
  21. data/documentation/docs/api/locator.md +189 -140
  22. data/documentation/docs/api/mouse.md +9 -4
  23. data/documentation/docs/api/page.md +304 -289
  24. data/documentation/docs/api/playwright.md +8 -5
  25. data/documentation/docs/api/request.md +34 -15
  26. data/documentation/docs/api/response.md +27 -10
  27. data/documentation/docs/api/route.md +44 -12
  28. data/documentation/docs/api/selectors.md +5 -3
  29. data/documentation/docs/api/touchscreen.md +2 -0
  30. data/documentation/docs/api/tracing.md +11 -11
  31. data/documentation/docs/api/web_socket.md +9 -4
  32. data/documentation/docs/api/worker.md +12 -11
  33. data/documentation/docs/include/api_coverage.md +2 -0
  34. data/lib/playwright/channel_owners/api_request_context.rb +37 -2
  35. data/lib/playwright/channel_owners/browser_context.rb +22 -26
  36. data/lib/playwright/channel_owners/page.rb +35 -25
  37. data/lib/playwright/channel_owners/route.rb +28 -8
  38. data/lib/playwright/event_emitter.rb +6 -1
  39. data/lib/playwright/locator_impl.rb +8 -0
  40. data/lib/playwright/select_option_values.rb +2 -0
  41. data/lib/playwright/version.rb +2 -2
  42. data/lib/playwright_api/accessibility.rb +9 -13
  43. data/lib/playwright_api/android.rb +14 -12
  44. data/lib/playwright_api/android_device.rb +38 -13
  45. data/lib/playwright_api/android_input.rb +5 -0
  46. data/lib/playwright_api/android_socket.rb +4 -2
  47. data/lib/playwright_api/android_web_view.rb +5 -2
  48. data/lib/playwright_api/api_request.rb +6 -3
  49. data/lib/playwright_api/api_request_context.rb +52 -42
  50. data/lib/playwright_api/api_response.rb +13 -2
  51. data/lib/playwright_api/browser.rb +30 -22
  52. data/lib/playwright_api/browser_context.rb +82 -45
  53. data/lib/playwright_api/browser_type.rb +29 -19
  54. data/lib/playwright_api/cdp_session.rb +9 -10
  55. data/lib/playwright_api/console_message.rb +13 -8
  56. data/lib/playwright_api/dialog.rb +14 -10
  57. data/lib/playwright_api/download.rb +19 -9
  58. data/lib/playwright_api/element_handle.rb +122 -99
  59. data/lib/playwright_api/file_chooser.rb +6 -1
  60. data/lib/playwright_api/frame.rb +186 -141
  61. data/lib/playwright_api/frame_locator.rb +29 -32
  62. data/lib/playwright_api/js_handle.rb +22 -12
  63. data/lib/playwright_api/keyboard.rb +29 -14
  64. data/lib/playwright_api/locator.rb +183 -112
  65. data/lib/playwright_api/mouse.rb +9 -2
  66. data/lib/playwright_api/page.rb +307 -259
  67. data/lib/playwright_api/playwright.rb +17 -10
  68. data/lib/playwright_api/request.rb +40 -13
  69. data/lib/playwright_api/response.rb +33 -16
  70. data/lib/playwright_api/route.rb +50 -17
  71. data/lib/playwright_api/selectors.rb +12 -7
  72. data/lib/playwright_api/touchscreen.rb +2 -0
  73. data/lib/playwright_api/tracing.rb +17 -11
  74. data/lib/playwright_api/web_socket.rb +15 -10
  75. data/lib/playwright_api/worker.rb +20 -17
  76. data/playwright.gemspec +2 -2
  77. data/sig/playwright.rbs +559 -0
  78. metadata +10 -9
@@ -0,0 +1,559 @@
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], ?method: String, ?postData: (String | String | untyped), ?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], ?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], ?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], ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?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 Accessibility
138
+ def snapshot: (?interestingOnly: bool, ?root: ElementHandle) -> (nil | Hash[untyped, untyped])
139
+ end
140
+
141
+ class FileChooser
142
+ def element: -> ElementHandle
143
+ def multiple?: -> bool
144
+ def page: -> Page
145
+ def set_files: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
146
+ def files=: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
147
+ end
148
+
149
+ class Frame
150
+ def add_script_tag: (?content: String, ?path: (String | File), ?type: String, ?url: String) -> ElementHandle
151
+ def add_style_tag: (?content: String, ?path: (String | File), ?url: String) -> ElementHandle
152
+ def check: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
153
+ def child_frames: -> Array[untyped]
154
+ 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
155
+ def content: -> String
156
+ 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
157
+ def dispatch_event: (String selector, String type_, ?eventInit: untyped, ?strict: bool, ?timeout: Float) -> void
158
+ def drag_and_drop: (String source, String target, ?force: bool, ?noWaitAfter: bool, ?sourcePosition: Hash[untyped, untyped], ?strict: bool, ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
159
+ def eval_on_selector: (String selector, String expression, ?arg: untyped, ?strict: bool) -> untyped
160
+ def eval_on_selector_all: (String selector, String expression, ?arg: untyped) -> untyped
161
+ def evaluate: (String expression, ?arg: untyped) -> untyped
162
+ def evaluate_handle: (String expression, ?arg: untyped) -> JSHandle
163
+ def fill: (String selector, String value, ?force: bool, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
164
+ def focus: (String selector, ?strict: bool, ?timeout: Float) -> void
165
+ def frame_element: -> ElementHandle
166
+ def frame_locator: (String selector) -> FrameLocator
167
+ def get_attribute: (String selector, String name, ?strict: bool, ?timeout: Float) -> (nil | String)
168
+ def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
169
+ def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
170
+ def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
171
+ 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
172
+ def get_by_test_id: ((String | Regexp) testId) -> Locator
173
+ def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
174
+ def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
175
+ def goto: (String url, ?referer: String, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
176
+ def hover: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
177
+ def inner_html: (String selector, ?strict: bool, ?timeout: Float) -> String
178
+ def inner_text: (String selector, ?strict: bool, ?timeout: Float) -> String
179
+ def input_value: (String selector, ?strict: bool, ?timeout: Float) -> String
180
+ def checked?: (String selector, ?strict: bool, ?timeout: Float) -> bool
181
+ def detached?: -> bool
182
+ def disabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
183
+ def editable?: (String selector, ?strict: bool, ?timeout: Float) -> bool
184
+ def enabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
185
+ def hidden?: (String selector, ?strict: bool, ?timeout: Float) -> bool
186
+ def visible?: (String selector, ?strict: bool, ?timeout: Float) -> bool
187
+ def locator: (String selector, ?has: Locator, ?hasText: (String | Regexp)) -> Locator
188
+ def name: -> String
189
+ def page: -> Page
190
+ def parent_frame: -> (nil | Frame)
191
+ def press: (String selector, String key, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
192
+ def query_selector: (String selector, ?strict: bool) -> (nil | ElementHandle)
193
+ def query_selector_all: (String selector) -> Array[untyped]
194
+ 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]
195
+ def set_checked: (String selector, bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
196
+ def set_content: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
197
+ def content=: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
198
+ def set_input_files: (String selector, ((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
199
+ def tap_point: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
200
+ def text_content: (String selector, ?strict: bool, ?timeout: Float) -> (nil | String)
201
+ def title: -> String
202
+ def type: (String selector, String text, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
203
+ def uncheck: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
204
+ def url: -> String
205
+ def wait_for_function: (String expression, ?arg: untyped, ?polling: (Float | "raf"), ?timeout: Float) -> JSHandle
206
+ def wait_for_load_state: (?state: ("load" | "domcontentloaded" | "networkidle"), ?timeout: Float) -> void
207
+ def expect_navigation: (?timeout: Float, ?url: (String | Regexp | function), ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) { () -> void } -> (nil | Response)
208
+ def wait_for_selector: (String selector, ?state: ("attached" | "detached" | "visible" | "hidden"), ?strict: bool, ?timeout: Float) -> (nil | ElementHandle)
209
+ def wait_for_timeout: (Float timeout) -> void
210
+ def wait_for_url: ((String | Regexp | function) url, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
211
+ end
212
+
213
+ class Worker
214
+ def evaluate: (String expression, ?arg: untyped) -> untyped
215
+ def evaluate_handle: (String expression, ?arg: untyped) -> JSHandle
216
+ def url: -> String
217
+ end
218
+
219
+ class Selectors
220
+ def register: (String name, ?contentScript: bool, ?path: (String | File), ?script: String) -> void
221
+ end
222
+
223
+ class ConsoleMessage
224
+ def args: -> Array[untyped]
225
+ def location: -> Hash[untyped, untyped]
226
+ def text: -> String
227
+ def type: -> String
228
+ end
229
+
230
+ class Dialog
231
+ def accept: (?promptText: String) -> void
232
+ def default_value: -> String
233
+ def dismiss: -> void
234
+ def message: -> String
235
+ def type: -> String
236
+ end
237
+
238
+ class Download
239
+ def cancel: -> void
240
+ def delete: -> void
241
+ def failure: -> (nil | String)
242
+ def page: -> Page
243
+ def path: -> (nil | (String | File))
244
+ def save_as: ((String | File) path) -> void
245
+ def suggested_filename: -> String
246
+ def url: -> String
247
+ end
248
+
249
+ class Page
250
+ def add_init_script: (?path: (String | File), ?script: String) -> void
251
+ def add_script_tag: (?content: String, ?path: (String | File), ?type: String, ?url: String) -> ElementHandle
252
+ def add_style_tag: (?content: String, ?path: (String | File), ?url: String) -> ElementHandle
253
+ def bring_to_front: -> void
254
+ def check: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
255
+ 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
256
+ def close: (?runBeforeUnload: bool) -> void
257
+ def content: -> String
258
+ def context: -> BrowserContext
259
+ 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
260
+ def dispatch_event: (String selector, String type_, ?eventInit: untyped, ?strict: bool, ?timeout: Float) -> void
261
+ def drag_and_drop: (String source, String target, ?force: bool, ?noWaitAfter: bool, ?sourcePosition: Hash[untyped, untyped], ?strict: bool, ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
262
+ def emulate_media: (?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?forcedColors: ("active" | "none" | "null"), ?media: ("screen" | "print" | "null"), ?reducedMotion: ("reduce" | "no-preference" | "null")) -> void
263
+ def eval_on_selector: (String selector, String expression, ?arg: untyped, ?strict: bool) -> untyped
264
+ def eval_on_selector_all: (String selector, String expression, ?arg: untyped) -> untyped
265
+ def evaluate: (String expression, ?arg: untyped) -> untyped
266
+ def evaluate_handle: (String expression, ?arg: untyped) -> JSHandle
267
+ def expose_binding: (String name, function callback, ?handle: bool) -> void
268
+ def expose_function: (String name, function callback) -> void
269
+ def fill: (String selector, String value, ?force: bool, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
270
+ def focus: (String selector, ?strict: bool, ?timeout: Float) -> void
271
+ def frame: (?name: String, ?url: (String | Regexp | function)) -> (nil | Frame)
272
+ def frame_locator: (String selector) -> FrameLocator
273
+ def frames: -> Array[untyped]
274
+ def get_attribute: (String selector, String name, ?strict: bool, ?timeout: Float) -> (nil | String)
275
+ def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
276
+ def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
277
+ def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
278
+ 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
279
+ def get_by_test_id: ((String | Regexp) testId) -> Locator
280
+ def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
281
+ def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
282
+ def go_back: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
283
+ def go_forward: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
284
+ def goto: (String url, ?referer: String, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
285
+ def hover: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
286
+ def inner_html: (String selector, ?strict: bool, ?timeout: Float) -> String
287
+ def inner_text: (String selector, ?strict: bool, ?timeout: Float) -> String
288
+ def input_value: (String selector, ?strict: bool, ?timeout: Float) -> String
289
+ def checked?: (String selector, ?strict: bool, ?timeout: Float) -> bool
290
+ def closed?: -> bool
291
+ def disabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
292
+ def editable?: (String selector, ?strict: bool, ?timeout: Float) -> bool
293
+ def enabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
294
+ def hidden?: (String selector, ?strict: bool, ?timeout: Float) -> bool
295
+ def visible?: (String selector, ?strict: bool, ?timeout: Float) -> bool
296
+ def locator: (String selector, ?has: Locator, ?hasText: (String | Regexp)) -> Locator
297
+ def main_frame: -> Frame
298
+ def opener: -> (nil | Page)
299
+ def pause: -> void
300
+ def pdf: (?displayHeaderFooter: bool, ?footerTemplate: String, ?format: String, ?headerTemplate: String, ?height: (String | Float), ?landscape: bool, ?margin: Hash[untyped, untyped], ?pageRanges: String, ?path: (String | File), ?preferCSSPageSize: bool, ?printBackground: bool, ?scale: Float, ?width: (String | Float)) -> String
301
+ def press: (String selector, String key, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
302
+ def query_selector: (String selector, ?strict: bool) -> (nil | ElementHandle)
303
+ def query_selector_all: (String selector) -> Array[untyped]
304
+ def reload: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
305
+ def route: ((String | Regexp | function) url, function handler, ?times: Integer) -> void
306
+ def route_from_har: ((String | File) har, ?notFound: ("abort" | "fallback"), ?update: bool, ?url: (String | Regexp)) -> void
307
+ def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?clip: Hash[untyped, untyped], ?fullPage: bool, ?mask: Array[untyped], ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?timeout: Float, ?type: ("png" | "jpeg")) -> String
308
+ 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]
309
+ def set_checked: (String selector, bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
310
+ def set_content: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
311
+ def content=: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
312
+ def set_default_navigation_timeout: (Float timeout) -> void
313
+ def default_navigation_timeout=: (Float timeout) -> void
314
+ def set_default_timeout: (Float timeout) -> void
315
+ def default_timeout=: (Float timeout) -> void
316
+ def set_extra_http_headers: (Hash[untyped, untyped] headers) -> void
317
+ def extra_http_headers=: (Hash[untyped, untyped] headers) -> void
318
+ def set_input_files: (String selector, ((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
319
+ def set_viewport_size: (Hash[untyped, untyped] viewportSize) -> void
320
+ def viewport_size=: (Hash[untyped, untyped] viewportSize) -> void
321
+ def tap_point: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
322
+ def text_content: (String selector, ?strict: bool, ?timeout: Float) -> (nil | String)
323
+ def title: -> String
324
+ def type: (String selector, String text, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
325
+ def uncheck: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
326
+ def unroute: ((String | Regexp | function) url, ?handler: function) -> void
327
+ def url: -> String
328
+ def video: -> (nil | untyped)
329
+ def viewport_size: -> (nil | Hash[untyped, untyped])
330
+ def expect_console_message: (?predicate: function, ?timeout: Float) { () -> void } -> ConsoleMessage
331
+ def expect_download: (?predicate: function, ?timeout: Float) { () -> void } -> Download
332
+ def expect_event: (String event, ?predicate: function, ?timeout: Float) { () -> void } -> untyped
333
+ def expect_file_chooser: (?predicate: function, ?timeout: Float) { () -> void } -> FileChooser
334
+ def wait_for_function: (String expression, ?arg: untyped, ?polling: (Float | "raf"), ?timeout: Float) -> JSHandle
335
+ def wait_for_load_state: (?state: ("load" | "domcontentloaded" | "networkidle"), ?timeout: Float) -> void
336
+ def expect_navigation: (?timeout: Float, ?url: (String | Regexp | function), ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) { () -> void } -> (nil | Response)
337
+ def expect_popup: (?predicate: function, ?timeout: Float) { () -> void } -> Page
338
+ def expect_request: ((String | Regexp | function) urlOrPredicate, ?timeout: Float) { () -> void } -> Request
339
+ def expect_request_finished: (?predicate: function, ?timeout: Float) { () -> void } -> Request
340
+ def expect_response: ((String | Regexp | function) urlOrPredicate, ?timeout: Float) { () -> void } -> Response
341
+ def wait_for_selector: (String selector, ?state: ("attached" | "detached" | "visible" | "hidden"), ?strict: bool, ?timeout: Float) -> (nil | ElementHandle)
342
+ def wait_for_timeout: (Float timeout) -> void
343
+ def wait_for_url: ((String | Regexp | function) url, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
344
+ def expect_websocket: (?predicate: function, ?timeout: Float) { () -> void } -> WebSocket
345
+ def expect_worker: (?predicate: function, ?timeout: Float) { () -> void } -> Worker
346
+ def workers: -> Array[untyped]
347
+
348
+ attr_reader accessibility: Accessibility
349
+ attr_reader keyboard: Keyboard
350
+ attr_reader mouse: Mouse
351
+ attr_reader request: APIRequestContext
352
+ attr_reader touchscreen: Touchscreen
353
+ end
354
+
355
+ class BrowserContext
356
+ def add_cookies: (Array[untyped] cookies) -> void
357
+ def add_init_script: (?path: (String | File), ?script: String) -> void
358
+ def background_pages: -> Array[untyped]
359
+ def browser: -> (nil | Browser)
360
+ def clear_cookies: -> void
361
+ def clear_permissions: -> void
362
+ def close: -> void
363
+ def cookies: (?urls: (String | Array[untyped])) -> Array[untyped]
364
+ def expose_binding: (String name, function callback, ?handle: bool) -> void
365
+ def expose_function: (String name, function callback) -> void
366
+ def grant_permissions: (Array[untyped] permissions, ?origin: String) -> void
367
+ def new_cdp_session: ((Page | Frame) page) -> CDPSession
368
+ def new_page: () ?{ (Page) -> untyped } -> Page
369
+ def pages: -> Array[untyped]
370
+ def route: ((String | Regexp | function) url, function handler, ?times: Integer) -> void
371
+ def route_from_har: ((String | File) har, ?notFound: ("abort" | "fallback"), ?update: bool, ?url: (String | Regexp)) -> void
372
+ def service_workers: -> Array[untyped]
373
+ def set_default_navigation_timeout: (Float timeout) -> void
374
+ def default_navigation_timeout=: (Float timeout) -> void
375
+ def set_default_timeout: (Float timeout) -> void
376
+ def default_timeout=: (Float timeout) -> void
377
+ def set_extra_http_headers: (Hash[untyped, untyped] headers) -> void
378
+ def extra_http_headers=: (Hash[untyped, untyped] headers) -> void
379
+ def set_geolocation: ((nil | Hash[untyped, untyped]) geolocation) -> void
380
+ def geolocation=: ((nil | Hash[untyped, untyped]) geolocation) -> void
381
+ def set_offline: (bool offline) -> void
382
+ def offline=: (bool offline) -> void
383
+ def storage_state: (?path: (String | File)) -> Hash[untyped, untyped]
384
+ def unroute: ((String | Regexp | function) url, ?handler: function) -> void
385
+ def expect_event: (String event, ?predicate: function, ?timeout: Float) { () -> void } -> untyped
386
+ def expect_page: (?predicate: function, ?timeout: Float) -> Page
387
+
388
+ attr_reader request: APIRequestContext
389
+ attr_reader tracing: Tracing
390
+ end
391
+
392
+ class CDPSession
393
+ def detach: -> void
394
+ def send_message: (String method, ?params: Hash[untyped, untyped]) -> Hash[untyped, untyped]
395
+ end
396
+
397
+ class Browser
398
+ def browser_type: -> BrowserType
399
+ def close: -> void
400
+ def contexts: -> Array[untyped]
401
+ def connected?: -> bool
402
+ def new_browser_cdp_session: -> CDPSession
403
+ def new_context: (?acceptDownloads: bool, ?baseURL: String, ?bypassCSP: bool, ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?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
404
+ def new_page: (?acceptDownloads: bool, ?baseURL: String, ?bypassCSP: bool, ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?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
405
+ def start_tracing: (?page: Page, ?categories: Array[untyped], ?path: (String | File), ?screenshots: bool) -> void
406
+ def stop_tracing: -> String
407
+ def version: -> String
408
+ end
409
+
410
+ class BrowserType
411
+ def connect_over_cdp: (String endpointURL, ?headers: Hash[untyped, untyped], ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
412
+ def executable_path: -> String
413
+ def launch: (?args: Array[untyped], ?channel: String, ?chromiumSandbox: bool, ?devtools: 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
414
+ def launch_persistent_context: ((String | File) userDataDir, ?acceptDownloads: bool, ?args: Array[untyped], ?baseURL: String, ?bypassCSP: bool, ?channel: String, ?chromiumSandbox: bool, ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?deviceScaleFactor: Float, ?devtools: bool, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?extraHTTPHeaders: 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
415
+ def name: -> String
416
+ end
417
+
418
+ class Playwright
419
+ attr_reader chromium: BrowserType
420
+ attr_reader devices: Hash[untyped, untyped]
421
+ attr_reader firefox: BrowserType
422
+ attr_reader selectors: Selectors
423
+ attr_reader webkit: BrowserType
424
+ end
425
+
426
+ class Tracing
427
+ def start: (?name: String, ?screenshots: bool, ?snapshots: bool, ?sources: bool, ?title: String) -> void
428
+ def start_chunk: (?title: String) -> void
429
+ def stop: (?path: (String | File)) -> void
430
+ def stop_chunk: (?path: (String | File)) -> void
431
+ end
432
+
433
+ class Locator
434
+ def all: -> Array[untyped]
435
+ def all_inner_texts: -> Array[untyped]
436
+ def all_text_contents: -> Array[untyped]
437
+ def blur: (?timeout: Float) -> void
438
+ def bounding_box: (?timeout: Float) -> (nil | Hash[untyped, untyped])
439
+ def check: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
440
+ def clear: (?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> void
441
+ def click: (?button: ("left" | "right" | "middle"), ?clickCount: Integer, ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
442
+ def count: -> Integer
443
+ def dblclick: (?button: ("left" | "right" | "middle"), ?delay: Float, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
444
+ def dispatch_event: (String type_, ?eventInit: untyped, ?timeout: Float) -> void
445
+ def drag_to: (Locator target, ?force: bool, ?noWaitAfter: bool, ?sourcePosition: Hash[untyped, untyped], ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
446
+ def element_handle: (?timeout: Float) -> ElementHandle
447
+ def element_handles: -> Array[untyped]
448
+ def evaluate: (String expression, ?arg: untyped, ?timeout: Float) -> untyped
449
+ def evaluate_all: (String expression, ?arg: untyped) -> untyped
450
+ def evaluate_handle: (String expression, ?arg: untyped, ?timeout: Float) -> JSHandle
451
+ def fill: (String value, ?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> void
452
+ def filter: (?has: Locator, ?hasText: (String | Regexp)) -> Locator
453
+ def first: -> Locator
454
+ def focus: (?timeout: Float) -> void
455
+ def frame_locator: (String selector) -> FrameLocator
456
+ def get_attribute: (String name, ?timeout: Float) -> (nil | String)
457
+ def []: (String name, ?timeout: Float) -> (nil | String)
458
+ def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
459
+ def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
460
+ def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
461
+ 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
462
+ def get_by_test_id: ((String | Regexp) testId) -> Locator
463
+ def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
464
+ def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
465
+ def highlight: -> void
466
+ def hover: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
467
+ def inner_html: (?timeout: Float) -> String
468
+ def inner_text: (?timeout: Float) -> String
469
+ def input_value: (?timeout: Float) -> String
470
+ def checked?: (?timeout: Float) -> bool
471
+ def disabled?: (?timeout: Float) -> bool
472
+ def editable?: (?timeout: Float) -> bool
473
+ def enabled?: (?timeout: Float) -> bool
474
+ def hidden?: (?timeout: Float) -> bool
475
+ def visible?: (?timeout: Float) -> bool
476
+ def last: -> Locator
477
+ def locator: (String selector, ?has: Locator, ?hasText: (String | Regexp)) -> Locator
478
+ def nth: (Integer index) -> Locator
479
+ def page: -> Page
480
+ def press: (String key, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
481
+ def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?mask: Array[untyped], ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?timeout: Float, ?type: ("png" | "jpeg")) -> String
482
+ def scroll_into_view_if_needed: (?timeout: Float) -> void
483
+ 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]
484
+ def select_text: (?force: bool, ?timeout: Float) -> void
485
+ def set_checked: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
486
+ def checked=: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
487
+ def set_input_files: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
488
+ def input_files=: (((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?timeout: Float) -> void
489
+ def tap_point: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
490
+ def text_content: (?timeout: Float) -> (nil | String)
491
+ def type: (String text, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
492
+ def uncheck: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
493
+ def wait_for: (?state: ("attached" | "detached" | "visible" | "hidden"), ?timeout: Float) -> void
494
+ end
495
+
496
+ class FrameLocator
497
+ def first: -> FrameLocator
498
+ def frame_locator: (String selector) -> FrameLocator
499
+ def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
500
+ def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
501
+ def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
502
+ 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
503
+ def get_by_test_id: ((String | Regexp) testId) -> Locator
504
+ def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
505
+ def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
506
+ def last: -> FrameLocator
507
+ def locator: (String selector, ?has: Locator, ?hasText: (String | Regexp)) -> Locator
508
+ def nth: (Integer index) -> FrameLocator
509
+ end
510
+
511
+ class APIResponse
512
+ def body: -> String
513
+ def dispose: -> void
514
+ def headers: -> Hash[untyped, untyped]
515
+ def headers_array: -> Array[untyped]
516
+ def json: -> untyped
517
+ def ok: -> bool
518
+ def status: -> Integer
519
+ def status_text: -> String
520
+ def text: -> String
521
+ def url: -> String
522
+ end
523
+
524
+ class APIRequestContext
525
+ def delete: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?multipart: Hash[untyped, untyped], ?params: Hash[untyped, untyped], ?timeout: Float) -> APIResponse
526
+ def dispose: -> void
527
+ def fetch: ((String | Request) urlOrRequest, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?method: String, ?multipart: Hash[untyped, untyped], ?params: Hash[untyped, untyped], ?timeout: Float) -> APIResponse
528
+ def get: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?multipart: Hash[untyped, untyped], ?params: Hash[untyped, untyped], ?timeout: Float) -> APIResponse
529
+ def head: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?multipart: Hash[untyped, untyped], ?params: Hash[untyped, untyped], ?timeout: Float) -> APIResponse
530
+ def patch: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?multipart: Hash[untyped, untyped], ?params: Hash[untyped, untyped], ?timeout: Float) -> APIResponse
531
+ def post: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?multipart: Hash[untyped, untyped], ?params: Hash[untyped, untyped], ?timeout: Float) -> APIResponse
532
+ def put: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?multipart: Hash[untyped, untyped], ?params: Hash[untyped, untyped], ?timeout: Float) -> APIResponse
533
+ end
534
+
535
+ class Android
536
+ def devices: (?host: String, ?omitDriverInstall: bool, ?port: Integer) -> Array[untyped]
537
+ end
538
+
539
+ class AndroidDevice
540
+ def close: -> void
541
+ def info: (untyped selector) -> untyped
542
+ def launch_browser: (?acceptDownloads: bool, ?args: Array[untyped], ?baseURL: String, ?bypassCSP: bool, ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?command: String, ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (untyped) -> untyped } -> BrowserContext
543
+ def model: -> String
544
+ def screenshot: (?path: (String | File)) -> String
545
+ def serial: -> String
546
+ def shell: (String command) -> String
547
+
548
+ attr_reader input: AndroidInput
549
+ end
550
+
551
+ class AndroidInput
552
+ def drag: (Hash[untyped, untyped] from, Hash[untyped, untyped] to, Integer steps) -> void
553
+ def press: (untyped key) -> void
554
+ def tap_point: (Hash[untyped, untyped] point) -> void
555
+ def type: (String text) -> void
556
+ end
557
+
558
+ def self.create: (playwright_cli_executable_path: String) { (Playwright) -> void } -> void
559
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playwright-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.28.1
4
+ version: 1.29.1.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-23 00:00:00.000000000 Z
11
+ date: 2023-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 2.3.0
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 2.3.0
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: chunky_png
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -378,6 +378,7 @@ files:
378
378
  - lib/playwright_api/web_socket.rb
379
379
  - lib/playwright_api/worker.rb
380
380
  - playwright.gemspec
381
+ - sig/playwright.rbs
381
382
  homepage: https://github.com/YusukeIwaki/playwright-ruby-client
382
383
  licenses:
383
384
  - MIT
@@ -393,12 +394,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
393
394
  version: '2.4'
394
395
  required_rubygems_version: !ruby/object:Gem::Requirement
395
396
  requirements:
396
- - - ">="
397
+ - - ">"
397
398
  - !ruby/object:Gem::Version
398
- version: '0'
399
+ version: 1.3.1
399
400
  requirements: []
400
401
  rubygems_version: 3.3.26
401
402
  signing_key:
402
403
  specification_version: 4
403
- summary: The Ruby binding of playwright driver 1.28.1
404
+ summary: The Ruby binding of playwright driver 1.29.1
404
405
  test_files: []