playwright-ruby-client 1.59.1 → 1.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/documentation/docs/api/api_request.md +25 -1
- data/documentation/docs/api/api_request_context.md +13 -11
- data/documentation/docs/api/api_response.md +18 -0
- data/documentation/docs/api/browser.md +18 -0
- data/documentation/docs/api/browser_context.md +7 -1
- data/documentation/docs/api/browser_type.md +19 -0
- data/documentation/docs/api/credentials.md +132 -0
- data/documentation/docs/api/frame.md +5 -4
- data/documentation/docs/api/frame_locator.md +1 -0
- data/documentation/docs/api/locator.md +37 -2
- data/documentation/docs/api/locator_assertions.md +1 -1
- data/documentation/docs/api/page.md +24 -4
- data/documentation/docs/api/page_assertions.md +28 -0
- data/documentation/docs/api/playwright.md +5 -0
- data/documentation/docs/api/touchscreen.md +1 -1
- data/documentation/docs/api/tracing.md +29 -0
- data/documentation/docs/api/web_storage.md +65 -0
- data/documentation/docs/include/api_coverage.md +30 -56
- data/lib/playwright/api_request_impl.rb +70 -0
- data/lib/playwright/api_response_impl.rb +8 -0
- data/lib/playwright/channel_owners/api_request_context.rb +5 -1
- data/lib/playwright/channel_owners/binding_call.rb +3 -9
- data/lib/playwright/channel_owners/browser.rb +17 -0
- data/lib/playwright/channel_owners/browser_context.rb +12 -55
- data/lib/playwright/channel_owners/browser_type.rb +35 -1
- data/lib/playwright/channel_owners/frame.rb +118 -13
- data/lib/playwright/channel_owners/json_pipe.rb +4 -0
- data/lib/playwright/channel_owners/local_utils.rb +11 -2
- data/lib/playwright/channel_owners/page.rb +28 -13
- data/lib/playwright/channel_owners/playwright.rb +4 -0
- data/lib/playwright/channel_owners/tracing.rb +105 -4
- data/lib/playwright/connection.rb +12 -2
- data/lib/playwright/console_message_impl.rb +10 -1
- data/lib/playwright/credentials_impl.rb +35 -0
- data/lib/playwright/errors.rb +7 -3
- data/lib/playwright/events.rb +7 -0
- data/lib/playwright/json_pipe_transport.rb +40 -0
- data/lib/playwright/locator_assertions_impl.rb +21 -4
- data/lib/playwright/locator_impl.rb +17 -3
- data/lib/playwright/locator_utils.rb +11 -1
- data/lib/playwright/page_assertions_impl.rb +33 -3
- data/lib/playwright/screencast.rb +8 -2
- data/lib/playwright/url_matcher.rb +35 -0
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright/waiter.rb +9 -41
- data/lib/playwright/web_storage_impl.rb +34 -0
- data/lib/playwright.rb +1 -0
- data/lib/playwright_api/api_request.rb +1 -1
- data/lib/playwright_api/api_request_context.rb +21 -17
- data/lib/playwright_api/api_response.rb +12 -0
- data/lib/playwright_api/browser.rb +8 -8
- data/lib/playwright_api/browser_context.rb +20 -13
- data/lib/playwright_api/browser_type.rb +12 -9
- data/lib/playwright_api/cdp_session.rb +6 -6
- data/lib/playwright_api/credentials.rb +120 -0
- data/lib/playwright_api/dialog.rb +6 -6
- data/lib/playwright_api/element_handle.rb +6 -6
- data/lib/playwright_api/frame.rb +25 -14
- data/lib/playwright_api/frame_locator.rb +2 -1
- data/lib/playwright_api/js_handle.rb +6 -6
- data/lib/playwright_api/locator.rb +39 -10
- data/lib/playwright_api/locator_assertions.rb +2 -2
- data/lib/playwright_api/page.rb +44 -25
- data/lib/playwright_api/page_assertions.rb +22 -0
- data/lib/playwright_api/playwright.rb +7 -7
- data/lib/playwright_api/request.rb +8 -8
- data/lib/playwright_api/response.rb +6 -6
- data/lib/playwright_api/route.rb +6 -6
- data/lib/playwright_api/touchscreen.rb +1 -1
- data/lib/playwright_api/tracing.rb +27 -4
- data/lib/playwright_api/web_socket.rb +6 -6
- data/lib/playwright_api/web_storage.rb +48 -0
- data/lib/playwright_api/worker.rb +8 -8
- data/sig/playwright.rbs +51 -39
- metadata +11 -12
- data/documentation/docs/api/experimental/android.md +0 -42
- data/documentation/docs/api/experimental/android_device.md +0 -109
- data/documentation/docs/api/experimental/android_input.md +0 -43
- data/documentation/docs/api/experimental/android_socket.md +0 -7
- data/documentation/docs/api/experimental/android_web_view.md +0 -7
- data/lib/playwright_api/android.rb +0 -68
- data/lib/playwright_api/android_device.rb +0 -229
- data/lib/playwright_api/android_input.rb +0 -34
- data/lib/playwright_api/android_socket.rb +0 -18
- data/lib/playwright_api/android_web_view.rb +0 -24
|
@@ -34,12 +34,6 @@ module Playwright
|
|
|
34
34
|
wrap_impl(@impl.wait_for_event(unwrap_impl(event), predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
# -- inherited from EventEmitter --
|
|
38
|
-
# @nodoc
|
|
39
|
-
def on(event, callback)
|
|
40
|
-
event_emitter_proxy.on(event, callback)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
37
|
# -- inherited from EventEmitter --
|
|
44
38
|
# @nodoc
|
|
45
39
|
def off(event, callback)
|
|
@@ -52,6 +46,12 @@ module Playwright
|
|
|
52
46
|
event_emitter_proxy.once(event, callback)
|
|
53
47
|
end
|
|
54
48
|
|
|
49
|
+
# -- inherited from EventEmitter --
|
|
50
|
+
# @nodoc
|
|
51
|
+
def on(event, callback)
|
|
52
|
+
event_emitter_proxy.on(event, callback)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
55
|
private def event_emitter_proxy
|
|
56
56
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
|
57
57
|
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
module Playwright
|
|
2
|
+
#
|
|
3
|
+
# WebStorage exposes the page's `localStorage` or `sessionStorage` for the current origin via an async,
|
|
4
|
+
# [browser-consistent](https://developer.mozilla.org/en-US/docs/Web/API/Storage) API.
|
|
5
|
+
#
|
|
6
|
+
# Instances are accessed through [`property: Page.localStorage`] and [`property: Page.sessionStorage`].
|
|
7
|
+
#
|
|
8
|
+
# ```python sync
|
|
9
|
+
# page.goto("https://example.com")
|
|
10
|
+
# page.local_storage.set_item("token", "abc")
|
|
11
|
+
# token = page.local_storage.get_item("token")
|
|
12
|
+
# all = page.local_storage.items()
|
|
13
|
+
# page.local_storage.remove_item("token")
|
|
14
|
+
# page.local_storage.clear()
|
|
15
|
+
# ```
|
|
16
|
+
class WebStorage < PlaywrightApi
|
|
17
|
+
|
|
18
|
+
#
|
|
19
|
+
# Returns all items in the storage as name/value pairs.
|
|
20
|
+
def items
|
|
21
|
+
wrap_impl(@impl.items)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
#
|
|
25
|
+
# Returns the value for the given `name` if present.
|
|
26
|
+
def get_item(name)
|
|
27
|
+
wrap_impl(@impl.get_item(unwrap_impl(name)))
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
#
|
|
31
|
+
# Sets the value for the given `name`. Overwrites any existing value for that name.
|
|
32
|
+
def set_item(name, value)
|
|
33
|
+
wrap_impl(@impl.set_item(unwrap_impl(name), unwrap_impl(value)))
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
#
|
|
37
|
+
# Removes the item with the given `name`. No-op if the item is absent.
|
|
38
|
+
def remove_item(name)
|
|
39
|
+
wrap_impl(@impl.remove_item(unwrap_impl(name)))
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
#
|
|
43
|
+
# Removes all items from the storage.
|
|
44
|
+
def clear
|
|
45
|
+
wrap_impl(@impl.clear)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -63,20 +63,14 @@ module Playwright
|
|
|
63
63
|
wrap_impl(@impl.expect_event(unwrap_impl(event), predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
# @nodoc
|
|
67
|
-
def context=(req)
|
|
68
|
-
wrap_impl(@impl.context=(unwrap_impl(req)))
|
|
69
|
-
end
|
|
70
|
-
|
|
71
66
|
# @nodoc
|
|
72
67
|
def page=(req)
|
|
73
68
|
wrap_impl(@impl.page=(unwrap_impl(req)))
|
|
74
69
|
end
|
|
75
70
|
|
|
76
|
-
# -- inherited from EventEmitter --
|
|
77
71
|
# @nodoc
|
|
78
|
-
def
|
|
79
|
-
|
|
72
|
+
def context=(req)
|
|
73
|
+
wrap_impl(@impl.context=(unwrap_impl(req)))
|
|
80
74
|
end
|
|
81
75
|
|
|
82
76
|
# -- inherited from EventEmitter --
|
|
@@ -91,6 +85,12 @@ module Playwright
|
|
|
91
85
|
event_emitter_proxy.once(event, callback)
|
|
92
86
|
end
|
|
93
87
|
|
|
88
|
+
# -- inherited from EventEmitter --
|
|
89
|
+
# @nodoc
|
|
90
|
+
def on(event, callback)
|
|
91
|
+
event_emitter_proxy.on(event, callback)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
94
|
private def event_emitter_proxy
|
|
95
95
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
|
96
96
|
end
|
data/sig/playwright.rbs
CHANGED
|
@@ -166,7 +166,7 @@ module Playwright
|
|
|
166
166
|
def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
167
167
|
def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
168
168
|
def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
169
|
-
def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
|
169
|
+
def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?description: (String | Regexp), ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
|
170
170
|
def get_by_test_id: ((String | Regexp) testId) -> Locator
|
|
171
171
|
def get_by_testid: ((String | Regexp) testId) -> Locator
|
|
172
172
|
def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
@@ -283,7 +283,7 @@ module Playwright
|
|
|
283
283
|
def eval_on_selector_all: (String selector, String expression, ?arg: untyped) -> untyped
|
|
284
284
|
def evaluate: (String expression, ?arg: untyped) -> untyped
|
|
285
285
|
def evaluate_handle: (String expression, ?arg: untyped) -> JSHandle
|
|
286
|
-
def expose_binding: (String name, function callback
|
|
286
|
+
def expose_binding: (String name, function callback) -> untyped
|
|
287
287
|
def expose_function: (String name, function callback) -> untyped
|
|
288
288
|
def fill: (String selector, String value, ?force: bool, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
|
|
289
289
|
def focus: (String selector, ?strict: bool, ?timeout: Float) -> void
|
|
@@ -294,7 +294,7 @@ module Playwright
|
|
|
294
294
|
def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
295
295
|
def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
296
296
|
def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
297
|
-
def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
|
297
|
+
def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?description: (String | Regexp), ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
|
298
298
|
def get_by_test_id: ((String | Regexp) testId) -> Locator
|
|
299
299
|
def get_by_testid: ((String | Regexp) testId) -> Locator
|
|
300
300
|
def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
@@ -302,6 +302,7 @@ module Playwright
|
|
|
302
302
|
def go_back: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
|
|
303
303
|
def go_forward: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
|
|
304
304
|
def goto: (String url, ?referer: String, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
|
|
305
|
+
def hide_highlight: -> void
|
|
305
306
|
def hover: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
|
|
306
307
|
def inner_html: (String selector, ?strict: bool, ?timeout: Float) -> String
|
|
307
308
|
def inner_text: (String selector, ?strict: bool, ?timeout: Float) -> String
|
|
@@ -344,7 +345,7 @@ module Playwright
|
|
|
344
345
|
def set_input_files: (String selector, ((String | File) | Array[untyped] | Hash[untyped, untyped] | Array[untyped]) files, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
|
|
345
346
|
def set_viewport_size: (Hash[untyped, untyped] viewportSize) -> void
|
|
346
347
|
def viewport_size=: (Hash[untyped, untyped] viewportSize) -> void
|
|
347
|
-
def aria_snapshot: (?depth: Integer, ?mode: ("ai" | "default"), ?timeout: Float) -> String
|
|
348
|
+
def aria_snapshot: (?boxes: bool, ?depth: Integer, ?mode: ("ai" | "default"), ?timeout: Float) -> String
|
|
348
349
|
def tap_point: (String selector, ?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
|
|
349
350
|
def text_content: (String selector, ?strict: bool, ?timeout: Float) -> (nil | String)
|
|
350
351
|
def title: -> String
|
|
@@ -375,6 +376,8 @@ module Playwright
|
|
|
375
376
|
|
|
376
377
|
attr_reader clock: Clock
|
|
377
378
|
attr_reader keyboard: Keyboard
|
|
379
|
+
attr_reader local_storage: WebStorage
|
|
380
|
+
attr_reader session_storage: WebStorage
|
|
378
381
|
attr_reader mouse: Mouse
|
|
379
382
|
attr_reader request: APIRequestContext
|
|
380
383
|
attr_reader screencast: untyped
|
|
@@ -390,7 +393,7 @@ module Playwright
|
|
|
390
393
|
def clear_permissions: -> void
|
|
391
394
|
def close: (?reason: String) -> void
|
|
392
395
|
def cookies: (?urls: (String | Array[untyped])) -> Array[untyped]
|
|
393
|
-
def expose_binding: (String name, function callback
|
|
396
|
+
def expose_binding: (String name, function callback) -> untyped
|
|
394
397
|
def expose_function: (String name, function callback) -> untyped
|
|
395
398
|
def grant_permissions: (Array[untyped] permissions, ?origin: String) -> void
|
|
396
399
|
def closed?: -> bool
|
|
@@ -420,6 +423,7 @@ module Playwright
|
|
|
420
423
|
def expect_page: (?predicate: function, ?timeout: Float) { () -> void } -> Page
|
|
421
424
|
|
|
422
425
|
attr_reader clock: Clock
|
|
426
|
+
attr_reader credentials: Credentials
|
|
423
427
|
attr_reader request: APIRequestContext
|
|
424
428
|
attr_reader tracing: Tracing
|
|
425
429
|
end
|
|
@@ -437,13 +441,16 @@ module Playwright
|
|
|
437
441
|
def new_browser_cdp_session: -> CDPSession
|
|
438
442
|
def new_context: (?acceptDownloads: bool, ?baseURL: String, ?bypassCSP: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?storageState: ((String | File) | Hash[untyped, untyped]), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (BrowserContext) -> untyped } -> BrowserContext
|
|
439
443
|
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
|
|
444
|
+
def bind: (String title, ?host: String, ?port: Integer, ?workspaceDir: String) -> Hash[untyped, untyped]
|
|
440
445
|
def start_tracing: (?page: Page, ?categories: Array[untyped], ?path: (String | File), ?screenshots: bool) -> void
|
|
441
446
|
def stop_tracing: -> String
|
|
447
|
+
def unbind: -> void
|
|
442
448
|
def version: -> String
|
|
443
449
|
end
|
|
444
450
|
|
|
445
451
|
class BrowserType
|
|
446
|
-
def
|
|
452
|
+
def connect: (String endpoint, ?exposeNetwork: String, ?headers: Hash[untyped, untyped], ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
|
|
453
|
+
def connect_over_cdp: (String endpointURL, ?artifactsDir: (String | File), ?headers: Hash[untyped, untyped], ?isLocal: bool, ?noDefaults: bool, ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
|
|
447
454
|
def executable_path: -> String
|
|
448
455
|
def launch: (?args: Array[untyped], ?artifactsDir: (String | File), ?channel: String, ?chromiumSandbox: bool, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?firefoxUserPrefs: Hash[untyped, untyped], ?handleSIGHUP: bool, ?handleSIGINT: bool, ?handleSIGTERM: bool, ?headless: bool, ?ignoreDefaultArgs: (bool | Array[untyped]), ?proxy: Hash[untyped, untyped], ?slowMo: Float, ?timeout: Float, ?tracesDir: (String | File)) ?{ (Browser) -> untyped } -> Browser
|
|
449
456
|
def launch_persistent_context: ((String | File) userDataDir, ?acceptDownloads: bool, ?args: Array[untyped], ?artifactsDir: (String | File), ?baseURL: String, ?bypassCSP: bool, ?channel: String, ?chromiumSandbox: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?extraHTTPHeaders: Hash[untyped, untyped], ?firefoxUserPrefs: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?handleSIGHUP: bool, ?handleSIGINT: bool, ?handleSIGTERM: bool, ?hasTouch: bool, ?headless: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreDefaultArgs: (bool | Array[untyped]), ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?slowMo: Float, ?strictSelectors: bool, ?timeout: Float, ?timezoneId: String, ?tracesDir: (String | File), ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (untyped) -> untyped } -> BrowserContext
|
|
@@ -454,6 +461,7 @@ module Playwright
|
|
|
454
461
|
attr_reader chromium: BrowserType
|
|
455
462
|
attr_reader devices: Hash[untyped, untyped]
|
|
456
463
|
attr_reader firefox: BrowserType
|
|
464
|
+
attr_reader request: APIRequest
|
|
457
465
|
attr_reader selectors: Selectors
|
|
458
466
|
attr_reader webkit: BrowserType
|
|
459
467
|
end
|
|
@@ -461,10 +469,12 @@ module Playwright
|
|
|
461
469
|
class Tracing
|
|
462
470
|
def start: (?live: bool, ?name: String, ?screenshots: bool, ?snapshots: bool, ?sources: bool, ?title: String) -> void
|
|
463
471
|
def start_chunk: (?name: String, ?title: String) -> void
|
|
472
|
+
def start_har: ((String | File) path, ?content: ("omit" | "embed" | "attach"), ?mode: ("full" | "minimal"), ?urlFilter: (String | Regexp)) -> untyped
|
|
464
473
|
def group: (String name, ?location: Hash[untyped, untyped]) -> untyped
|
|
465
474
|
def group_end: -> void
|
|
466
475
|
def stop: (?path: (String | File)) -> void
|
|
467
476
|
def stop_chunk: (?path: (String | File)) -> void
|
|
477
|
+
def stop_har: -> void
|
|
468
478
|
end
|
|
469
479
|
|
|
470
480
|
class Locator
|
|
@@ -472,7 +482,7 @@ module Playwright
|
|
|
472
482
|
def all_inner_texts: -> Array[untyped]
|
|
473
483
|
def all_text_contents: -> Array[untyped]
|
|
474
484
|
def and: (Locator locator) -> Locator
|
|
475
|
-
def aria_snapshot: (?depth: Integer, ?mode: ("ai" | "default"), ?timeout: Float) -> String
|
|
485
|
+
def aria_snapshot: (?boxes: bool, ?depth: Integer, ?mode: ("ai" | "default"), ?timeout: Float) -> String
|
|
476
486
|
def blur: (?timeout: Float) -> void
|
|
477
487
|
def bounding_box: (?timeout: Float) -> (nil | Hash[untyped, untyped])
|
|
478
488
|
def check: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
|
|
@@ -484,6 +494,7 @@ module Playwright
|
|
|
484
494
|
def description: -> (nil | String)
|
|
485
495
|
def dispatch_event: (String type_, ?eventInit: untyped, ?timeout: Float) -> void
|
|
486
496
|
def drag_to: (Locator target, ?force: bool, ?noWaitAfter: bool, ?sourcePosition: Hash[untyped, untyped], ?steps: Integer, ?targetPosition: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
|
|
497
|
+
def drop: (Hash[untyped, untyped] payload, ?position: Hash[untyped, untyped], ?timeout: Float) -> void
|
|
487
498
|
def element_handle: (?timeout: Float) -> ElementHandle
|
|
488
499
|
def element_handles: -> Array[untyped]
|
|
489
500
|
def content_frame: -> FrameLocator
|
|
@@ -500,12 +511,13 @@ module Playwright
|
|
|
500
511
|
def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
501
512
|
def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
502
513
|
def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
503
|
-
def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
|
514
|
+
def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?description: (String | Regexp), ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
|
504
515
|
def get_by_test_id: ((String | Regexp) testId) -> Locator
|
|
505
516
|
def get_by_testid: ((String | Regexp) testId) -> Locator
|
|
506
517
|
def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
507
518
|
def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
508
|
-
def
|
|
519
|
+
def hide_highlight: -> void
|
|
520
|
+
def highlight: (?style: String) -> untyped
|
|
509
521
|
def hover: (?force: bool, ?modifiers: Array[untyped], ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?timeout: Float, ?trial: bool) -> void
|
|
510
522
|
def inner_html: (?timeout: Float) -> String
|
|
511
523
|
def inner_text: (?timeout: Float) -> String
|
|
@@ -545,7 +557,7 @@ module Playwright
|
|
|
545
557
|
def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
546
558
|
def get_by_label: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
547
559
|
def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
548
|
-
def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
|
560
|
+
def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?description: (String | Regexp), ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
|
|
549
561
|
def get_by_test_id: ((String | Regexp) testId) -> Locator
|
|
550
562
|
def get_by_testid: ((String | Regexp) testId) -> Locator
|
|
551
563
|
def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
@@ -563,6 +575,8 @@ module Playwright
|
|
|
563
575
|
def headers_array: -> Array[untyped]
|
|
564
576
|
def json: -> untyped
|
|
565
577
|
def ok: -> bool
|
|
578
|
+
def security_details: -> (nil | Hash[untyped, untyped])
|
|
579
|
+
def server_addr: -> (nil | Hash[untyped, untyped])
|
|
566
580
|
def status: -> Integer
|
|
567
581
|
def status_text: -> String
|
|
568
582
|
def text: -> String
|
|
@@ -570,14 +584,20 @@ module Playwright
|
|
|
570
584
|
end
|
|
571
585
|
|
|
572
586
|
class APIRequestContext
|
|
573
|
-
def delete: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
587
|
+
def delete: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
574
588
|
def dispose: (?reason: String) -> void
|
|
575
|
-
def fetch: ((String | Request) urlOrRequest, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?method: String, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
576
|
-
def get: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
577
|
-
def head: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
578
|
-
def patch: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
579
|
-
def post: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
580
|
-
def put: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: Hash[untyped, untyped], ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: Hash[untyped, untyped], ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
589
|
+
def fetch: ((String | Request) urlOrRequest, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?method: String, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
590
|
+
def get: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
591
|
+
def head: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
592
|
+
def patch: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
593
|
+
def post: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
594
|
+
def put: (String url, ?data: (String | String | untyped), ?failOnStatusCode: bool, ?form: (Hash[untyped, untyped] | untyped), ?headers: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?maxRetries: Integer, ?multipart: (Hash[untyped, untyped] | untyped), ?params: (Hash[untyped, untyped] | String), ?timeout: Float) -> APIResponse
|
|
595
|
+
|
|
596
|
+
attr_reader tracing: Tracing
|
|
597
|
+
end
|
|
598
|
+
|
|
599
|
+
class APIRequest
|
|
600
|
+
def new_context: (?baseURL: String, ?clientCertificates: Array[untyped], ?extraHTTPHeaders: Hash[untyped, untyped], ?failOnStatusCode: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?proxy: Hash[untyped, untyped], ?storageState: ((String | File) | Hash[untyped, untyped]), ?timeout: Float, ?userAgent: String) -> APIRequestContext
|
|
581
601
|
end
|
|
582
602
|
|
|
583
603
|
class LocatorAssertions
|
|
@@ -625,7 +645,7 @@ module Playwright
|
|
|
625
645
|
def to_have_attribute: (String name, (String | Regexp) value, ?ignoreCase: bool, ?timeout: Float) -> void
|
|
626
646
|
def to_have_class: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?timeout: Float) -> void
|
|
627
647
|
def to_have_count: (Integer count, ?timeout: Float) -> void
|
|
628
|
-
def to_have_css: (String name, (String | Regexp) value, ?timeout: Float) -> void
|
|
648
|
+
def to_have_css: (String name, (String | Regexp) value, ?pseudo: ("before" | "after"), ?timeout: Float) -> void
|
|
629
649
|
def to_have_id: ((String | Regexp) id, ?timeout: Float) -> void
|
|
630
650
|
def to_have_js_property: (String name, untyped value, ?timeout: Float) -> void
|
|
631
651
|
def to_have_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?timeout: Float) -> void
|
|
@@ -638,33 +658,25 @@ module Playwright
|
|
|
638
658
|
class PageAssertions
|
|
639
659
|
def not_to_have_title: ((String | Regexp) titleOrRegExp, ?timeout: Float) -> void
|
|
640
660
|
def not_to_have_url: ((String | Regexp) urlOrRegExp, ?ignoreCase: bool, ?timeout: Float) -> void
|
|
661
|
+
def to_match_aria_snapshot: (String expected, ?timeout: Float) -> void
|
|
662
|
+
def not_to_match_aria_snapshot: (String expected, ?timeout: Float) -> void
|
|
641
663
|
def to_have_title: ((String | Regexp) titleOrRegExp, ?timeout: Float) -> void
|
|
642
664
|
def to_have_url: ((String | Regexp) urlOrRegExp, ?ignoreCase: bool, ?timeout: Float) -> void
|
|
643
665
|
end
|
|
644
666
|
|
|
645
|
-
class
|
|
646
|
-
def
|
|
647
|
-
def
|
|
648
|
-
def
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
class AndroidDevice
|
|
652
|
-
def close: -> void
|
|
653
|
-
def info: (untyped selector) -> untyped
|
|
654
|
-
def launch_browser: (?acceptDownloads: bool, ?args: Array[untyped], ?baseURL: String, ?bypassCSP: bool, ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?extraHTTPHeaders: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?hasTouch: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?pkg: String, ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (untyped) -> untyped } -> BrowserContext
|
|
655
|
-
def model: -> String
|
|
656
|
-
def screenshot: (?path: (String | File)) -> String
|
|
657
|
-
def serial: -> String
|
|
658
|
-
def shell: (String command) -> String
|
|
659
|
-
|
|
660
|
-
attr_reader input: AndroidInput
|
|
667
|
+
class WebStorage
|
|
668
|
+
def items: -> Array[untyped]
|
|
669
|
+
def get_item: (String name) -> (nil | String)
|
|
670
|
+
def set_item: (String name, String value) -> void
|
|
671
|
+
def remove_item: (String name) -> void
|
|
672
|
+
def clear: -> void
|
|
661
673
|
end
|
|
662
674
|
|
|
663
|
-
class
|
|
664
|
-
def
|
|
665
|
-
def
|
|
666
|
-
def
|
|
667
|
-
def
|
|
675
|
+
class Credentials
|
|
676
|
+
def install: -> void
|
|
677
|
+
def create: (String rpId, ?id: String, ?privateKey: String, ?publicKey: String, ?userHandle: String) -> Hash[untyped, untyped]
|
|
678
|
+
def delete: (String id) -> void
|
|
679
|
+
def get: (?id: String, ?rpId: String) -> Array[untyped]
|
|
668
680
|
end
|
|
669
681
|
|
|
670
682
|
def self.create: (playwright_cli_executable_path: String) { (Playwright) -> void } -> void
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: playwright-ruby-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.61.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- YusukeIwaki
|
|
@@ -245,15 +245,11 @@ files:
|
|
|
245
245
|
- documentation/docs/api/cdp_session.md
|
|
246
246
|
- documentation/docs/api/clock.md
|
|
247
247
|
- documentation/docs/api/console_message.md
|
|
248
|
+
- documentation/docs/api/credentials.md
|
|
248
249
|
- documentation/docs/api/dialog.md
|
|
249
250
|
- documentation/docs/api/download.md
|
|
250
251
|
- documentation/docs/api/element_handle.md
|
|
251
252
|
- documentation/docs/api/experimental/_category_.yml
|
|
252
|
-
- documentation/docs/api/experimental/android.md
|
|
253
|
-
- documentation/docs/api/experimental/android_device.md
|
|
254
|
-
- documentation/docs/api/experimental/android_input.md
|
|
255
|
-
- documentation/docs/api/experimental/android_socket.md
|
|
256
|
-
- documentation/docs/api/experimental/android_web_view.md
|
|
257
253
|
- documentation/docs/api/file_chooser.md
|
|
258
254
|
- documentation/docs/api/frame.md
|
|
259
255
|
- documentation/docs/api/frame_locator.md
|
|
@@ -272,6 +268,7 @@ files:
|
|
|
272
268
|
- documentation/docs/api/touchscreen.md
|
|
273
269
|
- documentation/docs/api/tracing.md
|
|
274
270
|
- documentation/docs/api/web_socket.md
|
|
271
|
+
- documentation/docs/api/web_storage.md
|
|
275
272
|
- documentation/docs/api/worker.md
|
|
276
273
|
- documentation/docs/article/api_coverage.mdx
|
|
277
274
|
- documentation/docs/article/getting_started.md
|
|
@@ -306,6 +303,7 @@ files:
|
|
|
306
303
|
- lib/playwright.rb
|
|
307
304
|
- lib/playwright/android_input_impl.rb
|
|
308
305
|
- lib/playwright/api_implementation.rb
|
|
306
|
+
- lib/playwright/api_request_impl.rb
|
|
309
307
|
- lib/playwright/api_response_impl.rb
|
|
310
308
|
- lib/playwright/channel.rb
|
|
311
309
|
- lib/playwright/channel_owner.rb
|
|
@@ -326,6 +324,7 @@ files:
|
|
|
326
324
|
- lib/playwright/channel_owners/fetch_request.rb
|
|
327
325
|
- lib/playwright/channel_owners/frame.rb
|
|
328
326
|
- lib/playwright/channel_owners/js_handle.rb
|
|
327
|
+
- lib/playwright/channel_owners/json_pipe.rb
|
|
329
328
|
- lib/playwright/channel_owners/local_utils.rb
|
|
330
329
|
- lib/playwright/channel_owners/overlay.rb
|
|
331
330
|
- lib/playwright/channel_owners/page.rb
|
|
@@ -341,6 +340,7 @@ files:
|
|
|
341
340
|
- lib/playwright/clock_impl.rb
|
|
342
341
|
- lib/playwright/connection.rb
|
|
343
342
|
- lib/playwright/console_message_impl.rb
|
|
343
|
+
- lib/playwright/credentials_impl.rb
|
|
344
344
|
- lib/playwright/disposable.rb
|
|
345
345
|
- lib/playwright/download_impl.rb
|
|
346
346
|
- lib/playwright/errors.rb
|
|
@@ -359,6 +359,7 @@ files:
|
|
|
359
359
|
- lib/playwright/javascript/value_parser.rb
|
|
360
360
|
- lib/playwright/javascript/value_serializer.rb
|
|
361
361
|
- lib/playwright/javascript/visitor_info.rb
|
|
362
|
+
- lib/playwright/json_pipe_transport.rb
|
|
362
363
|
- lib/playwright/keyboard_impl.rb
|
|
363
364
|
- lib/playwright/locator_assertions_impl.rb
|
|
364
365
|
- lib/playwright/locator_impl.rb
|
|
@@ -382,11 +383,7 @@ files:
|
|
|
382
383
|
- lib/playwright/waiter.rb
|
|
383
384
|
- lib/playwright/web_socket_client.rb
|
|
384
385
|
- lib/playwright/web_socket_transport.rb
|
|
385
|
-
- lib/
|
|
386
|
-
- lib/playwright_api/android_device.rb
|
|
387
|
-
- lib/playwright_api/android_input.rb
|
|
388
|
-
- lib/playwright_api/android_socket.rb
|
|
389
|
-
- lib/playwright_api/android_web_view.rb
|
|
386
|
+
- lib/playwright/web_storage_impl.rb
|
|
390
387
|
- lib/playwright_api/api_request.rb
|
|
391
388
|
- lib/playwright_api/api_request_context.rb
|
|
392
389
|
- lib/playwright_api/api_response.rb
|
|
@@ -396,6 +393,7 @@ files:
|
|
|
396
393
|
- lib/playwright_api/cdp_session.rb
|
|
397
394
|
- lib/playwright_api/clock.rb
|
|
398
395
|
- lib/playwright_api/console_message.rb
|
|
396
|
+
- lib/playwright_api/credentials.rb
|
|
399
397
|
- lib/playwright_api/dialog.rb
|
|
400
398
|
- lib/playwright_api/download.rb
|
|
401
399
|
- lib/playwright_api/element_handle.rb
|
|
@@ -417,6 +415,7 @@ files:
|
|
|
417
415
|
- lib/playwright_api/touchscreen.rb
|
|
418
416
|
- lib/playwright_api/tracing.rb
|
|
419
417
|
- lib/playwright_api/web_socket.rb
|
|
418
|
+
- lib/playwright_api/web_storage.rb
|
|
420
419
|
- lib/playwright_api/worker.rb
|
|
421
420
|
- playwright.gemspec
|
|
422
421
|
- sig/playwright.rbs
|
|
@@ -440,5 +439,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
440
439
|
requirements: []
|
|
441
440
|
rubygems_version: 3.6.9
|
|
442
441
|
specification_version: 4
|
|
443
|
-
summary: The Ruby binding of playwright driver 1.
|
|
442
|
+
summary: The Ruby binding of playwright driver 1.61.1
|
|
444
443
|
test_files: []
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 10
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Android
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Playwright has **experimental** support for Android automation. This includes Chrome for Android and Android WebView.
|
|
9
|
-
|
|
10
|
-
*Requirements*
|
|
11
|
-
- Android device or AVD Emulator.
|
|
12
|
-
- [ADB daemon](https://developer.android.com/studio/command-line/adb) running and authenticated with your device. Typically running `adb devices` is all you need to do.
|
|
13
|
-
- [`Chrome 87`](https://play.google.com/store/apps/details?id=com.android.chrome) or newer installed on the device
|
|
14
|
-
- "Enable command line on non-rooted devices" enabled in `chrome://flags`.
|
|
15
|
-
|
|
16
|
-
*Known limitations*
|
|
17
|
-
- Raw USB operation is not yet supported, so you need ADB.
|
|
18
|
-
- Device needs to be awake to produce screenshots. Enabling "Stay awake" developer mode will help.
|
|
19
|
-
- We didn't run all the tests against the device, so not everything works.
|
|
20
|
-
|
|
21
|
-
*How to run*
|
|
22
|
-
|
|
23
|
-
An example of the Android automation script would be:
|
|
24
|
-
|
|
25
|
-
## devices
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
def devices(host: nil, omitDriverInstall: nil, port: nil)
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
Returns the list of detected Android devices.
|
|
33
|
-
|
|
34
|
-
## set_default_timeout
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
def set_default_timeout(timeout)
|
|
38
|
-
```
|
|
39
|
-
alias: `default_timeout=`
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
This setting will change the default maximum time for all the methods accepting `timeout` option.
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 10
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# AndroidDevice
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[AndroidDevice](./android_device) represents a connected device, either real hardware or emulated. Devices can be obtained using [Android#devices](./android#devices).
|
|
9
|
-
|
|
10
|
-
## close
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
def close
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Disconnects from the device.
|
|
18
|
-
|
|
19
|
-
## info
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
def info(selector)
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Returns information about a widget defined by `selector`.
|
|
27
|
-
|
|
28
|
-
## launch_browser
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
def launch_browser(
|
|
32
|
-
acceptDownloads: nil,
|
|
33
|
-
args: nil,
|
|
34
|
-
baseURL: nil,
|
|
35
|
-
bypassCSP: nil,
|
|
36
|
-
colorScheme: nil,
|
|
37
|
-
contrast: nil,
|
|
38
|
-
deviceScaleFactor: nil,
|
|
39
|
-
extraHTTPHeaders: nil,
|
|
40
|
-
forcedColors: nil,
|
|
41
|
-
geolocation: nil,
|
|
42
|
-
hasTouch: nil,
|
|
43
|
-
httpCredentials: nil,
|
|
44
|
-
ignoreHTTPSErrors: nil,
|
|
45
|
-
isMobile: nil,
|
|
46
|
-
javaScriptEnabled: nil,
|
|
47
|
-
locale: nil,
|
|
48
|
-
noViewport: nil,
|
|
49
|
-
offline: nil,
|
|
50
|
-
permissions: nil,
|
|
51
|
-
pkg: nil,
|
|
52
|
-
proxy: nil,
|
|
53
|
-
record_har_content: nil,
|
|
54
|
-
record_har_mode: nil,
|
|
55
|
-
record_har_omit_content: nil,
|
|
56
|
-
record_har_path: nil,
|
|
57
|
-
record_har_url_filter: nil,
|
|
58
|
-
record_video_dir: nil,
|
|
59
|
-
record_video_size: nil,
|
|
60
|
-
reducedMotion: nil,
|
|
61
|
-
screen: nil,
|
|
62
|
-
serviceWorkers: nil,
|
|
63
|
-
strictSelectors: nil,
|
|
64
|
-
timezoneId: nil,
|
|
65
|
-
userAgent: nil,
|
|
66
|
-
viewport: nil,
|
|
67
|
-
&block)
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Launches Chrome browser on the device, and returns its persistent context.
|
|
72
|
-
|
|
73
|
-
## model
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
def model
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
Device model.
|
|
81
|
-
|
|
82
|
-
## screenshot
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
def screenshot(path: nil)
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Returns the buffer with the captured screenshot of the device.
|
|
90
|
-
|
|
91
|
-
## serial
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
def serial
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Device serial number.
|
|
99
|
-
|
|
100
|
-
## shell
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
def shell(command)
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Executes a shell command on the device and returns its output.
|
|
108
|
-
|
|
109
|
-
## input
|