playwright-ruby-client 1.62.0 → 1.63.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_context.md +3 -0
- data/documentation/docs/api/browser_context.md +3 -3
- data/documentation/docs/api/frame.md +12 -1
- data/documentation/docs/api/frame_locator.md +20 -0
- data/documentation/docs/api/locator.md +28 -0
- data/documentation/docs/api/page.md +12 -1
- data/documentation/docs/api/tracing.md +3 -1
- data/documentation/docs/article/guides/playwright_on_alpine_linux.md +1 -1
- data/documentation/docs/include/api_coverage.md +1 -0
- data/lib/playwright/api_request_impl.rb +3 -1
- data/lib/playwright/channel.rb +2 -1
- data/lib/playwright/channel_owners/browser.rb +1 -0
- data/lib/playwright/channel_owners/browser_context.rb +17 -2
- data/lib/playwright/channel_owners/frame.rb +2 -2
- data/lib/playwright/channel_owners/page.rb +2 -1
- data/lib/playwright/channel_owners/tracing.rb +43 -13
- data/lib/playwright/events.rb +2 -0
- data/lib/playwright/frame_locator_impl.rb +20 -5
- data/lib/playwright/locator_impl.rb +4 -0
- data/lib/playwright/utils.rb +12 -0
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright_api/api_request_context.rb +9 -7
- data/lib/playwright_api/browser.rb +6 -6
- data/lib/playwright_api/browser_context.rb +17 -17
- data/lib/playwright_api/browser_type.rb +6 -6
- data/lib/playwright_api/cdp_session.rb +6 -6
- 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 +20 -0
- data/lib/playwright_api/js_handle.rb +6 -6
- data/lib/playwright_api/locator.rb +25 -0
- data/lib/playwright_api/page.rb +28 -17
- data/lib/playwright_api/playwright.rb +6 -6
- 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/tracing.rb +10 -8
- data/lib/playwright_api/web_socket.rb +6 -6
- data/lib/playwright_api/worker.rb +8 -8
- data/sig/playwright.rbs +9 -8
- metadata +2 -2
|
@@ -63,14 +63,20 @@ 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 page=(req)
|
|
68
|
+
wrap_impl(@impl.page=(unwrap_impl(req)))
|
|
69
|
+
end
|
|
70
|
+
|
|
66
71
|
# @nodoc
|
|
67
72
|
def context=(req)
|
|
68
73
|
wrap_impl(@impl.context=(unwrap_impl(req)))
|
|
69
74
|
end
|
|
70
75
|
|
|
76
|
+
# -- inherited from EventEmitter --
|
|
71
77
|
# @nodoc
|
|
72
|
-
def
|
|
73
|
-
|
|
78
|
+
def off(event, callback)
|
|
79
|
+
event_emitter_proxy.off(event, callback)
|
|
74
80
|
end
|
|
75
81
|
|
|
76
82
|
# -- inherited from EventEmitter --
|
|
@@ -85,12 +91,6 @@ module Playwright
|
|
|
85
91
|
event_emitter_proxy.on(event, callback)
|
|
86
92
|
end
|
|
87
93
|
|
|
88
|
-
# -- inherited from EventEmitter --
|
|
89
|
-
# @nodoc
|
|
90
|
-
def off(event, callback)
|
|
91
|
-
event_emitter_proxy.off(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
|
@@ -161,7 +161,7 @@ module Playwright
|
|
|
161
161
|
def fill: (String selector, String value, ?force: bool, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
|
|
162
162
|
def focus: (String selector, ?strict: bool, ?timeout: Float) -> void
|
|
163
163
|
def frame_element: -> ElementHandle
|
|
164
|
-
def frame_locator: (String selector) -> FrameLocator
|
|
164
|
+
def frame_locator: (?String selector) -> FrameLocator
|
|
165
165
|
def get_attribute: (String selector, String name, ?strict: bool, ?timeout: Float) -> (nil | String)
|
|
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
|
|
@@ -288,7 +288,7 @@ module Playwright
|
|
|
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
|
|
290
290
|
def frame: (?name: String, ?url: (String | Regexp | function)) -> (nil | Frame)
|
|
291
|
-
def frame_locator: (String selector) -> FrameLocator
|
|
291
|
+
def frame_locator: (?String selector) -> FrameLocator
|
|
292
292
|
def frames: -> Array[untyped]
|
|
293
293
|
def get_attribute: (String selector, String name, ?strict: bool, ?timeout: Float) -> (nil | String)
|
|
294
294
|
def get_by_alt_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
|
@@ -413,7 +413,7 @@ module Playwright
|
|
|
413
413
|
def geolocation=: ((nil | Hash[untyped, untyped]) geolocation) -> void
|
|
414
414
|
def set_offline: (bool offline) -> void
|
|
415
415
|
def offline=: (bool offline) -> void
|
|
416
|
-
def storage_state: (?credentials: bool, ?indexedDB: bool, ?path: (String | File)) -> Hash[untyped, untyped]
|
|
416
|
+
def storage_state: (?credentials: bool, ?indexedDB: bool, ?opfs: bool, ?path: (String | File)) -> Hash[untyped, untyped]
|
|
417
417
|
def set_storage_state: (((String | File) | Hash[untyped, untyped]) storageState) -> void
|
|
418
418
|
def storage_state=: (((String | File) | Hash[untyped, untyped]) storageState) -> void
|
|
419
419
|
def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
|
|
@@ -439,8 +439,8 @@ module Playwright
|
|
|
439
439
|
def contexts: -> Array[untyped]
|
|
440
440
|
def connected?: -> bool
|
|
441
441
|
def new_browser_cdp_session: -> CDPSession
|
|
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
|
|
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
|
|
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] | 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"), ?storageState: ((String | File) | Hash[untyped, untyped]), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (BrowserContext) -> untyped } -> BrowserContext
|
|
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] | 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"), ?storageState: ((String | File) | Hash[untyped, untyped]), ?strictSelectors: bool, ?timezoneId: String, ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (Page) -> untyped } -> Page
|
|
444
444
|
def bind: (String title, ?host: String, ?port: Integer, ?workspaceDir: String) -> Hash[untyped, untyped]
|
|
445
445
|
def start_tracing: (?page: Page, ?categories: Array[untyped], ?path: (String | File), ?screenshots: bool) -> void
|
|
446
446
|
def stop_tracing: -> String
|
|
@@ -453,7 +453,7 @@ module Playwright
|
|
|
453
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
|
|
454
454
|
def executable_path: -> String
|
|
455
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
|
|
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
|
|
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] | Array[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
|
|
457
457
|
def name: -> String
|
|
458
458
|
end
|
|
459
459
|
|
|
@@ -467,7 +467,7 @@ module Playwright
|
|
|
467
467
|
end
|
|
468
468
|
|
|
469
469
|
class Tracing
|
|
470
|
-
def start: (?live: bool, ?name: String, ?screenshots: bool, ?snapshots: bool, ?sources: bool, ?title: String) -> void
|
|
470
|
+
def start: (?ariaSnapshots: bool, ?live: bool, ?name: String, ?screenshots: bool, ?screenSnapshots: bool, ?snapshots: bool, ?sources: bool, ?title: String) -> void
|
|
471
471
|
def start_chunk: (?name: String, ?title: String) -> void
|
|
472
472
|
def start_har: ((String | File) path, ?content: ("omit" | "embed" | "attach"), ?mode: ("full" | "minimal"), ?urlFilter: (String | Regexp)) -> untyped
|
|
473
473
|
def group: (String name, ?location: Hash[untyped, untyped]) -> untyped
|
|
@@ -548,6 +548,7 @@ module Playwright
|
|
|
548
548
|
def text_content: (?timeout: Float) -> (nil | String)
|
|
549
549
|
def type: (String text, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
|
|
550
550
|
def uncheck: (?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
|
|
551
|
+
def visible: -> Locator
|
|
551
552
|
def wait_for: (?state: ("attached" | "detached" | "visible" | "hidden"), ?timeout: Float) -> void
|
|
552
553
|
def wait_for_function: (String expression, ?arg: untyped, ?timeout: Float) -> void
|
|
553
554
|
end
|
|
@@ -599,7 +600,7 @@ module Playwright
|
|
|
599
600
|
end
|
|
600
601
|
|
|
601
602
|
class APIRequest
|
|
602
|
-
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
|
|
603
|
+
def new_context: (?baseURL: String, ?clientCertificates: Array[untyped], ?extraHTTPHeaders: Hash[untyped, untyped], ?failOnStatusCode: bool, ?httpCredentials: (Hash[untyped, untyped] | Array[untyped]), ?ignoreHTTPSErrors: bool, ?maxRedirects: Integer, ?proxy: Hash[untyped, untyped], ?storageState: ((String | File) | Hash[untyped, untyped]), ?timeout: Float, ?userAgent: String) -> APIRequestContext
|
|
603
604
|
end
|
|
604
605
|
|
|
605
606
|
class LocatorAssertions
|
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.63.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- YusukeIwaki
|
|
@@ -443,5 +443,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
443
443
|
requirements: []
|
|
444
444
|
rubygems_version: 3.6.9
|
|
445
445
|
specification_version: 4
|
|
446
|
-
summary: The Ruby binding of playwright driver 1.
|
|
446
|
+
summary: The Ruby binding of playwright driver 1.63.0
|
|
447
447
|
test_files: []
|