playwright-ruby-client 1.50.1 → 1.51.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/browser.md +2 -0
- data/documentation/docs/api/browser_context.md +2 -2
- data/documentation/docs/api/browser_type.md +1 -0
- data/documentation/docs/api/experimental/android_device.md +1 -0
- data/documentation/docs/api/locator.md +10 -10
- data/documentation/docs/api/page.md +6 -1
- data/documentation/docs/api/touchscreen.md +2 -0
- data/documentation/docs/api/web_socket.md +3 -1
- data/lib/playwright/channel_owners/browser_context.rb +2 -2
- data/lib/playwright/channel_owners/page.rb +2 -1
- data/lib/playwright/locator_assertions_impl.rb +1 -1
- data/lib/playwright/locator_impl.rb +9 -3
- data/lib/playwright/utils.rb +1 -1
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright_api/android_device.rb +2 -1
- data/lib/playwright_api/api_request.rb +1 -0
- data/lib/playwright_api/api_request_context.rb +1 -1
- data/lib/playwright_api/browser.rb +4 -2
- data/lib/playwright_api/browser_context.rb +3 -3
- data/lib/playwright_api/browser_type.rb +8 -2
- data/lib/playwright_api/locator.rb +11 -11
- data/lib/playwright_api/page.rb +7 -2
- data/lib/playwright_api/touchscreen.rb +2 -0
- data/lib/playwright_api/web_socket.rb +3 -1
- data/lib/playwright_api/worker.rb +4 -4
- data/sig/playwright.rbs +7 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f0c4c8f2c68d03a9009e450794670263e74a7bff0f94307ac38222ac402b06b
|
4
|
+
data.tar.gz: a21fee77abeef39269d2d84b511a37ac3df6a6f9bb0b3e881be20bd4fb055073
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c744d68230d2f37b6ce1894d55156ecfc943739c8d713332098ed73eb2c12533fab814685eaf3efdabd5561227c1deef042aad50e22e98b91e3be2e61f9974a2
|
7
|
+
data.tar.gz: 8b1e2a83b1eac587c1df0963c586a64361191384018175972bf40eab3dcdb86d9b01a3d202f9d24e6b611f250ca8ead38f112252970ed0f292e4bd2fa5b5f27e
|
@@ -92,6 +92,7 @@ def new_context(
|
|
92
92
|
bypassCSP: nil,
|
93
93
|
clientCertificates: nil,
|
94
94
|
colorScheme: nil,
|
95
|
+
contrast: nil,
|
95
96
|
deviceScaleFactor: nil,
|
96
97
|
extraHTTPHeaders: nil,
|
97
98
|
forcedColors: nil,
|
@@ -152,6 +153,7 @@ def new_page(
|
|
152
153
|
bypassCSP: nil,
|
153
154
|
clientCertificates: nil,
|
154
155
|
colorScheme: nil,
|
156
|
+
contrast: nil,
|
155
157
|
deviceScaleFactor: nil,
|
156
158
|
extraHTTPHeaders: nil,
|
157
159
|
forcedColors: nil,
|
@@ -421,11 +421,11 @@ alias: `offline=`
|
|
421
421
|
## storage_state
|
422
422
|
|
423
423
|
```
|
424
|
-
def storage_state(path: nil)
|
424
|
+
def storage_state(indexedDB: nil, path: nil)
|
425
425
|
```
|
426
426
|
|
427
427
|
|
428
|
-
Returns storage state for this browser context, contains current cookies
|
428
|
+
Returns storage state for this browser context, contains current cookies, local storage snapshot and IndexedDB snapshot.
|
429
429
|
|
430
430
|
## unroute_all
|
431
431
|
|
@@ -458,11 +458,6 @@ If `expression` throws or rejects, this method throws.
|
|
458
458
|
|
459
459
|
**Usage**
|
460
460
|
|
461
|
-
```ruby
|
462
|
-
tweet = page.query_selector(".tweet .retweets")
|
463
|
-
tweet.evaluate("node => node.innerText") # => "10 retweets"
|
464
|
-
```
|
465
|
-
|
466
461
|
## evaluate_all
|
467
462
|
|
468
463
|
```
|
@@ -534,7 +529,12 @@ To send fine-grained keyboard events, use [Locator#press_sequentially](./locator
|
|
534
529
|
## filter
|
535
530
|
|
536
531
|
```
|
537
|
-
def filter(
|
532
|
+
def filter(
|
533
|
+
has: nil,
|
534
|
+
hasNot: nil,
|
535
|
+
hasNotText: nil,
|
536
|
+
hasText: nil,
|
537
|
+
visible: nil)
|
538
538
|
```
|
539
539
|
|
540
540
|
|
@@ -1238,9 +1238,9 @@ Triggers a `change` and `input` event once all the provided options have been se
|
|
1238
1238
|
|
1239
1239
|
```html
|
1240
1240
|
<select multiple>
|
1241
|
-
<option value="red">Red</
|
1242
|
-
<option value="green">Green</
|
1243
|
-
<option value="blue">Blue</
|
1241
|
+
<option value="red">Red</option>
|
1242
|
+
<option value="green">Green</option>
|
1243
|
+
<option value="blue">Blue</option>
|
1244
1244
|
</select>
|
1245
1245
|
```
|
1246
1246
|
|
@@ -1349,7 +1349,7 @@ def tap_point(
|
|
1349
1349
|
```
|
1350
1350
|
|
1351
1351
|
|
1352
|
-
Perform a tap gesture on the element matching the locator.
|
1352
|
+
Perform a tap gesture on the element matching the locator. For examples of emulating other gestures by manually dispatching touch events, see the [emulating legacy touch events](https://playwright.dev/python/docs/touch-events) page.
|
1353
1353
|
|
1354
1354
|
**Details**
|
1355
1355
|
|
@@ -293,7 +293,12 @@ page.drag_and_drop(
|
|
293
293
|
## emulate_media
|
294
294
|
|
295
295
|
```
|
296
|
-
def emulate_media(
|
296
|
+
def emulate_media(
|
297
|
+
colorScheme: nil,
|
298
|
+
contrast: nil,
|
299
|
+
forcedColors: nil,
|
300
|
+
media: nil,
|
301
|
+
reducedMotion: nil)
|
297
302
|
```
|
298
303
|
|
299
304
|
|
@@ -8,6 +8,8 @@ sidebar_position: 10
|
|
8
8
|
The Touchscreen class operates in main-frame CSS pixels relative to the top-left corner of the viewport. Methods on the
|
9
9
|
touchscreen can only be used in browser contexts that have been initialized with `hasTouch` set to true.
|
10
10
|
|
11
|
+
This class is limited to emulating tap gestures. For examples of other gestures simulated by manually dispatching touch events, see the [emulating legacy touch events](https://playwright.dev/python/docs/touch-events) page.
|
12
|
+
|
11
13
|
## tap_point
|
12
14
|
|
13
15
|
```
|
@@ -5,7 +5,9 @@ sidebar_position: 10
|
|
5
5
|
# WebSocket
|
6
6
|
|
7
7
|
|
8
|
-
The [WebSocket](./web_socket) class represents
|
8
|
+
The [WebSocket](./web_socket) class represents WebSocket connections within a page. It provides the ability to inspect and manipulate the data being transmitted and received.
|
9
|
+
|
10
|
+
If you want to intercept or modify WebSocket frames, consider using `WebSocketRoute`.
|
9
11
|
|
10
12
|
## closed?
|
11
13
|
|
@@ -496,8 +496,8 @@ module Playwright
|
|
496
496
|
@channel.send_message_to_server('pause')
|
497
497
|
end
|
498
498
|
|
499
|
-
def storage_state(path: nil)
|
500
|
-
@channel.send_message_to_server_result('storageState', {}).tap do |result|
|
499
|
+
def storage_state(path: nil, indexedDB: nil)
|
500
|
+
@channel.send_message_to_server_result('storageState', { indexedDB: indexedDB }.compact).tap do |result|
|
501
501
|
if path
|
502
502
|
File.open(path, 'w') do |f|
|
503
503
|
f.write(JSON.dump(result))
|
@@ -366,9 +366,10 @@ module Playwright
|
|
366
366
|
ChannelOwners::Response.from_nullable(resp)
|
367
367
|
end
|
368
368
|
|
369
|
-
def emulate_media(colorScheme: nil, forcedColors: nil, media: nil, reducedMotion: nil)
|
369
|
+
def emulate_media(colorScheme: nil, contrast: nil, forcedColors: nil, media: nil, reducedMotion: nil)
|
370
370
|
params = {
|
371
371
|
colorScheme: no_override_if_null(colorScheme),
|
372
|
+
contrast: no_override_if_null(contrast),
|
372
373
|
forcedColors: no_override_if_null(forcedColors),
|
373
374
|
media: no_override_if_null(media),
|
374
375
|
reducedMotion: no_override_if_null(reducedMotion),
|
@@ -494,7 +494,7 @@ module Playwright
|
|
494
494
|
def to_be_in_viewport(ratio: nil, timeout: nil)
|
495
495
|
expect_impl(
|
496
496
|
"to.be.in.viewport",
|
497
|
-
{ timeout: timeout, expectedNumber: ratio },
|
497
|
+
{ timeout: timeout, expectedNumber: ratio }.compact,
|
498
498
|
nil,
|
499
499
|
"Locator expected to be in viewport"
|
500
500
|
)
|
@@ -5,7 +5,7 @@ module Playwright
|
|
5
5
|
define_api_implementation :LocatorImpl do
|
6
6
|
include LocatorUtils
|
7
7
|
|
8
|
-
def initialize(frame:, timeout_settings:, selector:, has: nil, hasNot: nil, hasNotText: nil, hasText: nil)
|
8
|
+
def initialize(frame:, timeout_settings:, selector:, has: nil, hasNot: nil, hasNotText: nil, hasText: nil, visible: nil)
|
9
9
|
@frame = frame
|
10
10
|
@timeout_settings = timeout_settings
|
11
11
|
selector_scopes = [selector]
|
@@ -32,6 +32,10 @@ module Playwright
|
|
32
32
|
selector_scopes << "internal:has-not=#{hasNot.send(:selector_json)}"
|
33
33
|
end
|
34
34
|
|
35
|
+
if [true, false].include?(visible)
|
36
|
+
selector_scopes << "visible=#{visible}"
|
37
|
+
end
|
38
|
+
|
35
39
|
@selector = selector_scopes.join(' >> ')
|
36
40
|
end
|
37
41
|
|
@@ -241,7 +245,7 @@ module Playwright
|
|
241
245
|
)
|
242
246
|
end
|
243
247
|
|
244
|
-
def filter(has: nil, hasNot: nil, hasNotText: nil, hasText: nil)
|
248
|
+
def filter(has: nil, hasNot: nil, hasNotText: nil, hasText: nil, visible: nil)
|
245
249
|
LocatorImpl.new(
|
246
250
|
frame: @frame,
|
247
251
|
timeout_settings: @timeout_settings,
|
@@ -249,7 +253,9 @@ module Playwright
|
|
249
253
|
has: has,
|
250
254
|
hasNot: hasNot,
|
251
255
|
hasNotText: hasNotText,
|
252
|
-
hasText: hasText
|
256
|
+
hasText: hasText,
|
257
|
+
visible: visible,
|
258
|
+
)
|
253
259
|
end
|
254
260
|
|
255
261
|
def first
|
data/lib/playwright/utils.rb
CHANGED
@@ -57,7 +57,7 @@ module Playwright
|
|
57
57
|
params[:storageState] = JSON.parse(File.read(params[:storageState]))
|
58
58
|
end
|
59
59
|
|
60
|
-
%i[colorScheme reducedMotion forcedColors].each do |key|
|
60
|
+
%i[colorScheme reducedMotion forcedColors contrast].each do |key|
|
61
61
|
if params[key] == 'null'
|
62
62
|
params[key] = 'no-override'
|
63
63
|
end
|
data/lib/playwright/version.rb
CHANGED
@@ -51,6 +51,7 @@ module Playwright
|
|
51
51
|
baseURL: nil,
|
52
52
|
bypassCSP: nil,
|
53
53
|
colorScheme: nil,
|
54
|
+
contrast: nil,
|
54
55
|
deviceScaleFactor: nil,
|
55
56
|
extraHTTPHeaders: nil,
|
56
57
|
forcedColors: nil,
|
@@ -81,7 +82,7 @@ module Playwright
|
|
81
82
|
userAgent: nil,
|
82
83
|
viewport: nil,
|
83
84
|
&block)
|
84
|
-
wrap_impl(@impl.launch_browser(acceptDownloads: unwrap_impl(acceptDownloads), args: unwrap_impl(args), baseURL: unwrap_impl(baseURL), bypassCSP: unwrap_impl(bypassCSP), colorScheme: unwrap_impl(colorScheme), deviceScaleFactor: unwrap_impl(deviceScaleFactor), extraHTTPHeaders: unwrap_impl(extraHTTPHeaders), forcedColors: unwrap_impl(forcedColors), geolocation: unwrap_impl(geolocation), hasTouch: unwrap_impl(hasTouch), httpCredentials: unwrap_impl(httpCredentials), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), isMobile: unwrap_impl(isMobile), javaScriptEnabled: unwrap_impl(javaScriptEnabled), locale: unwrap_impl(locale), noViewport: unwrap_impl(noViewport), offline: unwrap_impl(offline), permissions: unwrap_impl(permissions), pkg: unwrap_impl(pkg), proxy: unwrap_impl(proxy), record_har_content: unwrap_impl(record_har_content), record_har_mode: unwrap_impl(record_har_mode), record_har_omit_content: unwrap_impl(record_har_omit_content), record_har_path: unwrap_impl(record_har_path), record_har_url_filter: unwrap_impl(record_har_url_filter), record_video_dir: unwrap_impl(record_video_dir), record_video_size: unwrap_impl(record_video_size), reducedMotion: unwrap_impl(reducedMotion), screen: unwrap_impl(screen), serviceWorkers: unwrap_impl(serviceWorkers), strictSelectors: unwrap_impl(strictSelectors), timezoneId: unwrap_impl(timezoneId), userAgent: unwrap_impl(userAgent), viewport: unwrap_impl(viewport), &wrap_block_call(block)))
|
85
|
+
wrap_impl(@impl.launch_browser(acceptDownloads: unwrap_impl(acceptDownloads), args: unwrap_impl(args), baseURL: unwrap_impl(baseURL), bypassCSP: unwrap_impl(bypassCSP), colorScheme: unwrap_impl(colorScheme), contrast: unwrap_impl(contrast), deviceScaleFactor: unwrap_impl(deviceScaleFactor), extraHTTPHeaders: unwrap_impl(extraHTTPHeaders), forcedColors: unwrap_impl(forcedColors), geolocation: unwrap_impl(geolocation), hasTouch: unwrap_impl(hasTouch), httpCredentials: unwrap_impl(httpCredentials), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), isMobile: unwrap_impl(isMobile), javaScriptEnabled: unwrap_impl(javaScriptEnabled), locale: unwrap_impl(locale), noViewport: unwrap_impl(noViewport), offline: unwrap_impl(offline), permissions: unwrap_impl(permissions), pkg: unwrap_impl(pkg), proxy: unwrap_impl(proxy), record_har_content: unwrap_impl(record_har_content), record_har_mode: unwrap_impl(record_har_mode), record_har_omit_content: unwrap_impl(record_har_omit_content), record_har_path: unwrap_impl(record_har_path), record_har_url_filter: unwrap_impl(record_har_url_filter), record_video_dir: unwrap_impl(record_video_dir), record_video_size: unwrap_impl(record_video_size), reducedMotion: unwrap_impl(reducedMotion), screen: unwrap_impl(screen), serviceWorkers: unwrap_impl(serviceWorkers), strictSelectors: unwrap_impl(strictSelectors), timezoneId: unwrap_impl(timezoneId), userAgent: unwrap_impl(userAgent), viewport: unwrap_impl(viewport), &wrap_block_call(block)))
|
85
86
|
end
|
86
87
|
|
87
88
|
#
|
@@ -282,7 +282,7 @@ module Playwright
|
|
282
282
|
|
283
283
|
#
|
284
284
|
# Returns storage state for this request context, contains current cookies and local storage snapshot if it was passed to the constructor.
|
285
|
-
def storage_state(path: nil)
|
285
|
+
def storage_state(indexedDB: nil, path: nil)
|
286
286
|
raise NotImplementedError.new('storage_state is not implemented yet.')
|
287
287
|
end
|
288
288
|
|
@@ -92,6 +92,7 @@ module Playwright
|
|
92
92
|
bypassCSP: nil,
|
93
93
|
clientCertificates: nil,
|
94
94
|
colorScheme: nil,
|
95
|
+
contrast: nil,
|
95
96
|
deviceScaleFactor: nil,
|
96
97
|
extraHTTPHeaders: nil,
|
97
98
|
forcedColors: nil,
|
@@ -122,7 +123,7 @@ module Playwright
|
|
122
123
|
userAgent: nil,
|
123
124
|
viewport: nil,
|
124
125
|
&block)
|
125
|
-
wrap_impl(@impl.new_context(acceptDownloads: unwrap_impl(acceptDownloads), baseURL: unwrap_impl(baseURL), bypassCSP: unwrap_impl(bypassCSP), clientCertificates: unwrap_impl(clientCertificates), colorScheme: unwrap_impl(colorScheme), deviceScaleFactor: unwrap_impl(deviceScaleFactor), extraHTTPHeaders: unwrap_impl(extraHTTPHeaders), forcedColors: unwrap_impl(forcedColors), geolocation: unwrap_impl(geolocation), hasTouch: unwrap_impl(hasTouch), httpCredentials: unwrap_impl(httpCredentials), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), isMobile: unwrap_impl(isMobile), javaScriptEnabled: unwrap_impl(javaScriptEnabled), locale: unwrap_impl(locale), noViewport: unwrap_impl(noViewport), offline: unwrap_impl(offline), permissions: unwrap_impl(permissions), proxy: unwrap_impl(proxy), record_har_content: unwrap_impl(record_har_content), record_har_mode: unwrap_impl(record_har_mode), record_har_omit_content: unwrap_impl(record_har_omit_content), record_har_path: unwrap_impl(record_har_path), record_har_url_filter: unwrap_impl(record_har_url_filter), record_video_dir: unwrap_impl(record_video_dir), record_video_size: unwrap_impl(record_video_size), reducedMotion: unwrap_impl(reducedMotion), screen: unwrap_impl(screen), serviceWorkers: unwrap_impl(serviceWorkers), storageState: unwrap_impl(storageState), strictSelectors: unwrap_impl(strictSelectors), timezoneId: unwrap_impl(timezoneId), userAgent: unwrap_impl(userAgent), viewport: unwrap_impl(viewport), &wrap_block_call(block)))
|
126
|
+
wrap_impl(@impl.new_context(acceptDownloads: unwrap_impl(acceptDownloads), baseURL: unwrap_impl(baseURL), bypassCSP: unwrap_impl(bypassCSP), clientCertificates: unwrap_impl(clientCertificates), colorScheme: unwrap_impl(colorScheme), contrast: unwrap_impl(contrast), deviceScaleFactor: unwrap_impl(deviceScaleFactor), extraHTTPHeaders: unwrap_impl(extraHTTPHeaders), forcedColors: unwrap_impl(forcedColors), geolocation: unwrap_impl(geolocation), hasTouch: unwrap_impl(hasTouch), httpCredentials: unwrap_impl(httpCredentials), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), isMobile: unwrap_impl(isMobile), javaScriptEnabled: unwrap_impl(javaScriptEnabled), locale: unwrap_impl(locale), noViewport: unwrap_impl(noViewport), offline: unwrap_impl(offline), permissions: unwrap_impl(permissions), proxy: unwrap_impl(proxy), record_har_content: unwrap_impl(record_har_content), record_har_mode: unwrap_impl(record_har_mode), record_har_omit_content: unwrap_impl(record_har_omit_content), record_har_path: unwrap_impl(record_har_path), record_har_url_filter: unwrap_impl(record_har_url_filter), record_video_dir: unwrap_impl(record_video_dir), record_video_size: unwrap_impl(record_video_size), reducedMotion: unwrap_impl(reducedMotion), screen: unwrap_impl(screen), serviceWorkers: unwrap_impl(serviceWorkers), storageState: unwrap_impl(storageState), strictSelectors: unwrap_impl(strictSelectors), timezoneId: unwrap_impl(timezoneId), userAgent: unwrap_impl(userAgent), viewport: unwrap_impl(viewport), &wrap_block_call(block)))
|
126
127
|
end
|
127
128
|
|
128
129
|
#
|
@@ -137,6 +138,7 @@ module Playwright
|
|
137
138
|
bypassCSP: nil,
|
138
139
|
clientCertificates: nil,
|
139
140
|
colorScheme: nil,
|
141
|
+
contrast: nil,
|
140
142
|
deviceScaleFactor: nil,
|
141
143
|
extraHTTPHeaders: nil,
|
142
144
|
forcedColors: nil,
|
@@ -167,7 +169,7 @@ module Playwright
|
|
167
169
|
userAgent: nil,
|
168
170
|
viewport: nil,
|
169
171
|
&block)
|
170
|
-
wrap_impl(@impl.new_page(acceptDownloads: unwrap_impl(acceptDownloads), baseURL: unwrap_impl(baseURL), bypassCSP: unwrap_impl(bypassCSP), clientCertificates: unwrap_impl(clientCertificates), colorScheme: unwrap_impl(colorScheme), deviceScaleFactor: unwrap_impl(deviceScaleFactor), extraHTTPHeaders: unwrap_impl(extraHTTPHeaders), forcedColors: unwrap_impl(forcedColors), geolocation: unwrap_impl(geolocation), hasTouch: unwrap_impl(hasTouch), httpCredentials: unwrap_impl(httpCredentials), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), isMobile: unwrap_impl(isMobile), javaScriptEnabled: unwrap_impl(javaScriptEnabled), locale: unwrap_impl(locale), noViewport: unwrap_impl(noViewport), offline: unwrap_impl(offline), permissions: unwrap_impl(permissions), proxy: unwrap_impl(proxy), record_har_content: unwrap_impl(record_har_content), record_har_mode: unwrap_impl(record_har_mode), record_har_omit_content: unwrap_impl(record_har_omit_content), record_har_path: unwrap_impl(record_har_path), record_har_url_filter: unwrap_impl(record_har_url_filter), record_video_dir: unwrap_impl(record_video_dir), record_video_size: unwrap_impl(record_video_size), reducedMotion: unwrap_impl(reducedMotion), screen: unwrap_impl(screen), serviceWorkers: unwrap_impl(serviceWorkers), storageState: unwrap_impl(storageState), strictSelectors: unwrap_impl(strictSelectors), timezoneId: unwrap_impl(timezoneId), userAgent: unwrap_impl(userAgent), viewport: unwrap_impl(viewport), &wrap_block_call(block)))
|
172
|
+
wrap_impl(@impl.new_page(acceptDownloads: unwrap_impl(acceptDownloads), baseURL: unwrap_impl(baseURL), bypassCSP: unwrap_impl(bypassCSP), clientCertificates: unwrap_impl(clientCertificates), colorScheme: unwrap_impl(colorScheme), contrast: unwrap_impl(contrast), deviceScaleFactor: unwrap_impl(deviceScaleFactor), extraHTTPHeaders: unwrap_impl(extraHTTPHeaders), forcedColors: unwrap_impl(forcedColors), geolocation: unwrap_impl(geolocation), hasTouch: unwrap_impl(hasTouch), httpCredentials: unwrap_impl(httpCredentials), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), isMobile: unwrap_impl(isMobile), javaScriptEnabled: unwrap_impl(javaScriptEnabled), locale: unwrap_impl(locale), noViewport: unwrap_impl(noViewport), offline: unwrap_impl(offline), permissions: unwrap_impl(permissions), proxy: unwrap_impl(proxy), record_har_content: unwrap_impl(record_har_content), record_har_mode: unwrap_impl(record_har_mode), record_har_omit_content: unwrap_impl(record_har_omit_content), record_har_path: unwrap_impl(record_har_path), record_har_url_filter: unwrap_impl(record_har_url_filter), record_video_dir: unwrap_impl(record_video_dir), record_video_size: unwrap_impl(record_video_size), reducedMotion: unwrap_impl(reducedMotion), screen: unwrap_impl(screen), serviceWorkers: unwrap_impl(serviceWorkers), storageState: unwrap_impl(storageState), strictSelectors: unwrap_impl(strictSelectors), timezoneId: unwrap_impl(timezoneId), userAgent: unwrap_impl(userAgent), viewport: unwrap_impl(viewport), &wrap_block_call(block)))
|
171
173
|
end
|
172
174
|
|
173
175
|
#
|
@@ -404,9 +404,9 @@ module Playwright
|
|
404
404
|
alias_method :offline=, :set_offline
|
405
405
|
|
406
406
|
#
|
407
|
-
# Returns storage state for this browser context, contains current cookies
|
408
|
-
def storage_state(path: nil)
|
409
|
-
wrap_impl(@impl.storage_state(path: unwrap_impl(path)))
|
407
|
+
# Returns storage state for this browser context, contains current cookies, local storage snapshot and IndexedDB snapshot.
|
408
|
+
def storage_state(indexedDB: nil, path: nil)
|
409
|
+
wrap_impl(@impl.storage_state(indexedDB: unwrap_impl(indexedDB), path: unwrap_impl(path)))
|
410
410
|
end
|
411
411
|
|
412
412
|
#
|
@@ -23,7 +23,12 @@ module Playwright
|
|
23
23
|
# This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.
|
24
24
|
#
|
25
25
|
# **NOTE**: The major and minor version of the Playwright instance that connects needs to match the version of Playwright that launches the browser (1.2.3 → is compatible with 1.2.x).
|
26
|
-
def connect
|
26
|
+
def connect(
|
27
|
+
wsEndpoint,
|
28
|
+
exposeNetwork: nil,
|
29
|
+
headers: nil,
|
30
|
+
slowMo: nil,
|
31
|
+
timeout: nil)
|
27
32
|
raise NotImplementedError.new('connect is not implemented yet.')
|
28
33
|
end
|
29
34
|
|
@@ -123,6 +128,7 @@ module Playwright
|
|
123
128
|
chromiumSandbox: nil,
|
124
129
|
clientCertificates: nil,
|
125
130
|
colorScheme: nil,
|
131
|
+
contrast: nil,
|
126
132
|
deviceScaleFactor: nil,
|
127
133
|
devtools: nil,
|
128
134
|
downloadsPath: nil,
|
@@ -165,7 +171,7 @@ module Playwright
|
|
165
171
|
userAgent: nil,
|
166
172
|
viewport: nil,
|
167
173
|
&block)
|
168
|
-
wrap_impl(@impl.launch_persistent_context(unwrap_impl(userDataDir), acceptDownloads: unwrap_impl(acceptDownloads), args: unwrap_impl(args), baseURL: unwrap_impl(baseURL), bypassCSP: unwrap_impl(bypassCSP), channel: unwrap_impl(channel), chromiumSandbox: unwrap_impl(chromiumSandbox), clientCertificates: unwrap_impl(clientCertificates), colorScheme: unwrap_impl(colorScheme), deviceScaleFactor: unwrap_impl(deviceScaleFactor), devtools: unwrap_impl(devtools), downloadsPath: unwrap_impl(downloadsPath), env: unwrap_impl(env), executablePath: unwrap_impl(executablePath), extraHTTPHeaders: unwrap_impl(extraHTTPHeaders), firefoxUserPrefs: unwrap_impl(firefoxUserPrefs), forcedColors: unwrap_impl(forcedColors), geolocation: unwrap_impl(geolocation), handleSIGHUP: unwrap_impl(handleSIGHUP), handleSIGINT: unwrap_impl(handleSIGINT), handleSIGTERM: unwrap_impl(handleSIGTERM), hasTouch: unwrap_impl(hasTouch), headless: unwrap_impl(headless), httpCredentials: unwrap_impl(httpCredentials), ignoreDefaultArgs: unwrap_impl(ignoreDefaultArgs), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), isMobile: unwrap_impl(isMobile), javaScriptEnabled: unwrap_impl(javaScriptEnabled), locale: unwrap_impl(locale), noViewport: unwrap_impl(noViewport), offline: unwrap_impl(offline), permissions: unwrap_impl(permissions), proxy: unwrap_impl(proxy), record_har_content: unwrap_impl(record_har_content), record_har_mode: unwrap_impl(record_har_mode), record_har_omit_content: unwrap_impl(record_har_omit_content), record_har_path: unwrap_impl(record_har_path), record_har_url_filter: unwrap_impl(record_har_url_filter), record_video_dir: unwrap_impl(record_video_dir), record_video_size: unwrap_impl(record_video_size), reducedMotion: unwrap_impl(reducedMotion), screen: unwrap_impl(screen), serviceWorkers: unwrap_impl(serviceWorkers), slowMo: unwrap_impl(slowMo), strictSelectors: unwrap_impl(strictSelectors), timeout: unwrap_impl(timeout), timezoneId: unwrap_impl(timezoneId), tracesDir: unwrap_impl(tracesDir), userAgent: unwrap_impl(userAgent), viewport: unwrap_impl(viewport), &wrap_block_call(block)))
|
174
|
+
wrap_impl(@impl.launch_persistent_context(unwrap_impl(userDataDir), acceptDownloads: unwrap_impl(acceptDownloads), args: unwrap_impl(args), baseURL: unwrap_impl(baseURL), bypassCSP: unwrap_impl(bypassCSP), channel: unwrap_impl(channel), chromiumSandbox: unwrap_impl(chromiumSandbox), clientCertificates: unwrap_impl(clientCertificates), colorScheme: unwrap_impl(colorScheme), contrast: unwrap_impl(contrast), deviceScaleFactor: unwrap_impl(deviceScaleFactor), devtools: unwrap_impl(devtools), downloadsPath: unwrap_impl(downloadsPath), env: unwrap_impl(env), executablePath: unwrap_impl(executablePath), extraHTTPHeaders: unwrap_impl(extraHTTPHeaders), firefoxUserPrefs: unwrap_impl(firefoxUserPrefs), forcedColors: unwrap_impl(forcedColors), geolocation: unwrap_impl(geolocation), handleSIGHUP: unwrap_impl(handleSIGHUP), handleSIGINT: unwrap_impl(handleSIGINT), handleSIGTERM: unwrap_impl(handleSIGTERM), hasTouch: unwrap_impl(hasTouch), headless: unwrap_impl(headless), httpCredentials: unwrap_impl(httpCredentials), ignoreDefaultArgs: unwrap_impl(ignoreDefaultArgs), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), isMobile: unwrap_impl(isMobile), javaScriptEnabled: unwrap_impl(javaScriptEnabled), locale: unwrap_impl(locale), noViewport: unwrap_impl(noViewport), offline: unwrap_impl(offline), permissions: unwrap_impl(permissions), proxy: unwrap_impl(proxy), record_har_content: unwrap_impl(record_har_content), record_har_mode: unwrap_impl(record_har_mode), record_har_omit_content: unwrap_impl(record_har_omit_content), record_har_path: unwrap_impl(record_har_path), record_har_url_filter: unwrap_impl(record_har_url_filter), record_video_dir: unwrap_impl(record_video_dir), record_video_size: unwrap_impl(record_video_size), reducedMotion: unwrap_impl(reducedMotion), screen: unwrap_impl(screen), serviceWorkers: unwrap_impl(serviceWorkers), slowMo: unwrap_impl(slowMo), strictSelectors: unwrap_impl(strictSelectors), timeout: unwrap_impl(timeout), timezoneId: unwrap_impl(timezoneId), tracesDir: unwrap_impl(tracesDir), userAgent: unwrap_impl(userAgent), viewport: unwrap_impl(viewport), &wrap_block_call(block)))
|
169
175
|
end
|
170
176
|
|
171
177
|
#
|
@@ -393,11 +393,6 @@ module Playwright
|
|
393
393
|
# If `expression` throws or rejects, this method throws.
|
394
394
|
#
|
395
395
|
# **Usage**
|
396
|
-
#
|
397
|
-
# ```python sync
|
398
|
-
# tweets = page.locator(".tweet .retweets")
|
399
|
-
# assert tweets.evaluate("node => node.innerText") == "10 retweets"
|
400
|
-
# ```
|
401
396
|
def evaluate(expression, arg: nil, timeout: nil)
|
402
397
|
wrap_impl(@impl.evaluate(unwrap_impl(expression), arg: unwrap_impl(arg), timeout: unwrap_impl(timeout)))
|
403
398
|
end
|
@@ -474,8 +469,13 @@ module Playwright
|
|
474
469
|
# has=page.get_by_role("button", name="column 2 button")
|
475
470
|
# ).screenshot()
|
476
471
|
# ```
|
477
|
-
def filter(
|
478
|
-
|
472
|
+
def filter(
|
473
|
+
has: nil,
|
474
|
+
hasNot: nil,
|
475
|
+
hasNotText: nil,
|
476
|
+
hasText: nil,
|
477
|
+
visible: nil)
|
478
|
+
wrap_impl(@impl.filter(has: unwrap_impl(has), hasNot: unwrap_impl(hasNot), hasNotText: unwrap_impl(hasNotText), hasText: unwrap_impl(hasText), visible: unwrap_impl(visible)))
|
479
479
|
end
|
480
480
|
|
481
481
|
#
|
@@ -1047,9 +1047,9 @@ module Playwright
|
|
1047
1047
|
#
|
1048
1048
|
# ```html
|
1049
1049
|
# <select multiple>
|
1050
|
-
# <option value="red">Red</
|
1051
|
-
# <option value="green">Green</
|
1052
|
-
# <option value="blue">Blue</
|
1050
|
+
# <option value="red">Red</option>
|
1051
|
+
# <option value="green">Green</option>
|
1052
|
+
# <option value="blue">Blue</option>
|
1053
1053
|
# </select>
|
1054
1054
|
# ```
|
1055
1055
|
#
|
@@ -1153,7 +1153,7 @@ module Playwright
|
|
1153
1153
|
alias_method :input_files=, :set_input_files
|
1154
1154
|
|
1155
1155
|
#
|
1156
|
-
# Perform a tap gesture on the element matching the locator.
|
1156
|
+
# Perform a tap gesture on the element matching the locator. For examples of emulating other gestures by manually dispatching touch events, see the [emulating legacy touch events](../touch-events.md) page.
|
1157
1157
|
#
|
1158
1158
|
# **Details**
|
1159
1159
|
#
|
data/lib/playwright_api/page.rb
CHANGED
@@ -316,8 +316,13 @@ module Playwright
|
|
316
316
|
# page.evaluate("matchMedia('(prefers-color-scheme: light)').matches")
|
317
317
|
# # → False
|
318
318
|
# ```
|
319
|
-
def emulate_media(
|
320
|
-
|
319
|
+
def emulate_media(
|
320
|
+
colorScheme: nil,
|
321
|
+
contrast: nil,
|
322
|
+
forcedColors: nil,
|
323
|
+
media: nil,
|
324
|
+
reducedMotion: nil)
|
325
|
+
wrap_impl(@impl.emulate_media(colorScheme: unwrap_impl(colorScheme), contrast: unwrap_impl(contrast), forcedColors: unwrap_impl(forcedColors), media: unwrap_impl(media), reducedMotion: unwrap_impl(reducedMotion)))
|
321
326
|
end
|
322
327
|
|
323
328
|
#
|
@@ -2,6 +2,8 @@ module Playwright
|
|
2
2
|
#
|
3
3
|
# The Touchscreen class operates in main-frame CSS pixels relative to the top-left corner of the viewport. Methods on the
|
4
4
|
# touchscreen can only be used in browser contexts that have been initialized with `hasTouch` set to true.
|
5
|
+
#
|
6
|
+
# This class is limited to emulating tap gestures. For examples of other gestures simulated by manually dispatching touch events, see the [emulating legacy touch events](../touch-events.md) page.
|
5
7
|
class Touchscreen < PlaywrightApi
|
6
8
|
|
7
9
|
#
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Playwright
|
2
2
|
#
|
3
|
-
# The `WebSocket` class represents
|
3
|
+
# The `WebSocket` class represents WebSocket connections within a page. It provides the ability to inspect and manipulate the data being transmitted and received.
|
4
|
+
#
|
5
|
+
# If you want to intercept or modify WebSocket frames, consider using `WebSocketRoute`.
|
4
6
|
class WebSocket < PlaywrightApi
|
5
7
|
|
6
8
|
#
|
@@ -47,13 +47,13 @@ module Playwright
|
|
47
47
|
end
|
48
48
|
|
49
49
|
# @nodoc
|
50
|
-
def
|
51
|
-
wrap_impl(@impl.
|
50
|
+
def page=(req)
|
51
|
+
wrap_impl(@impl.page=(unwrap_impl(req)))
|
52
52
|
end
|
53
53
|
|
54
54
|
# @nodoc
|
55
|
-
def
|
56
|
-
wrap_impl(@impl.
|
55
|
+
def context=(req)
|
56
|
+
wrap_impl(@impl.context=(unwrap_impl(req)))
|
57
57
|
end
|
58
58
|
|
59
59
|
# -- inherited from EventEmitter --
|
data/sig/playwright.rbs
CHANGED
@@ -273,7 +273,7 @@ module Playwright
|
|
273
273
|
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
|
274
274
|
def dispatch_event: (String selector, String type_, ?eventInit: untyped, ?strict: bool, ?timeout: Float) -> void
|
275
275
|
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
|
276
|
-
def emulate_media: (?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?forcedColors: ("active" | "none" | "null"), ?media: ("screen" | "print" | "null"), ?reducedMotion: ("reduce" | "no-preference" | "null")) -> void
|
276
|
+
def emulate_media: (?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?forcedColors: ("active" | "none" | "null"), ?media: ("screen" | "print" | "null"), ?reducedMotion: ("reduce" | "no-preference" | "null")) -> void
|
277
277
|
def eval_on_selector: (String selector, String expression, ?arg: untyped, ?strict: bool) -> untyped
|
278
278
|
def eval_on_selector_all: (String selector, String expression, ?arg: untyped) -> untyped
|
279
279
|
def evaluate: (String expression, ?arg: untyped) -> untyped
|
@@ -396,7 +396,7 @@ module Playwright
|
|
396
396
|
def geolocation=: ((nil | Hash[untyped, untyped]) geolocation) -> void
|
397
397
|
def set_offline: (bool offline) -> void
|
398
398
|
def offline=: (bool offline) -> void
|
399
|
-
def storage_state: (?path: (String | File)) -> Hash[untyped, untyped]
|
399
|
+
def storage_state: (?indexedDB: bool, ?path: (String | File)) -> Hash[untyped, untyped]
|
400
400
|
def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
|
401
401
|
def unroute: ((String | Regexp | function) url, ?handler: function) -> void
|
402
402
|
def expect_console_message: (?predicate: function, ?timeout: Float) { () -> void } -> ConsoleMessage
|
@@ -419,8 +419,8 @@ module Playwright
|
|
419
419
|
def contexts: -> Array[untyped]
|
420
420
|
def connected?: -> bool
|
421
421
|
def new_browser_cdp_session: -> CDPSession
|
422
|
-
def new_context: (?acceptDownloads: bool, ?baseURL: String, ?bypassCSP: bool, ?clientCertificates: Array[untyped], ?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
|
423
|
-
def new_page: (?acceptDownloads: bool, ?baseURL: String, ?bypassCSP: bool, ?clientCertificates: Array[untyped], ?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
|
422
|
+
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
|
423
|
+
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
|
424
424
|
def start_tracing: (?page: Page, ?categories: Array[untyped], ?path: (String | File), ?screenshots: bool) -> void
|
425
425
|
def stop_tracing: -> String
|
426
426
|
def version: -> String
|
@@ -430,7 +430,7 @@ module Playwright
|
|
430
430
|
def connect_over_cdp: (String endpointURL, ?headers: Hash[untyped, untyped], ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
|
431
431
|
def executable_path: -> String
|
432
432
|
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
|
433
|
-
def launch_persistent_context: ((String | File) userDataDir, ?acceptDownloads: bool, ?args: Array[untyped], ?baseURL: String, ?bypassCSP: bool, ?channel: String, ?chromiumSandbox: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?deviceScaleFactor: Float, ?devtools: bool, ?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
|
433
|
+
def launch_persistent_context: ((String | File) userDataDir, ?acceptDownloads: bool, ?args: Array[untyped], ?baseURL: String, ?bypassCSP: bool, ?channel: String, ?chromiumSandbox: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?devtools: bool, ?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
|
434
434
|
def name: -> String
|
435
435
|
end
|
436
436
|
|
@@ -473,7 +473,7 @@ module Playwright
|
|
473
473
|
def evaluate_all: (String expression, ?arg: untyped) -> untyped
|
474
474
|
def evaluate_handle: (String expression, ?arg: untyped, ?timeout: Float) -> JSHandle
|
475
475
|
def fill: (String value, ?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> void
|
476
|
-
def filter: (?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
|
476
|
+
def filter: (?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp), ?visible: bool) -> Locator
|
477
477
|
def first: -> Locator
|
478
478
|
def focus: (?timeout: Float) -> void
|
479
479
|
def frame_locator: (String selector) -> FrameLocator
|
@@ -626,7 +626,7 @@ module Playwright
|
|
626
626
|
class AndroidDevice
|
627
627
|
def close: -> void
|
628
628
|
def info: (untyped selector) -> untyped
|
629
|
-
def launch_browser: (?acceptDownloads: bool, ?args: Array[untyped], ?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], ?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
|
629
|
+
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
|
630
630
|
def model: -> String
|
631
631
|
def screenshot: (?path: (String | File)) -> String
|
632
632
|
def serial: -> String
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
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.51.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-03-17 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: concurrent-ruby
|
@@ -409,5 +409,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
409
409
|
requirements: []
|
410
410
|
rubygems_version: 3.6.2
|
411
411
|
specification_version: 4
|
412
|
-
summary: The Ruby binding of playwright driver 1.
|
412
|
+
summary: The Ruby binding of playwright driver 1.51.0
|
413
413
|
test_files: []
|