playwright-ruby-client 1.64.1 → 1.65.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 +1 -1
- data/documentation/docs/api/browser_context.md +1 -1
- data/documentation/docs/api/cdp_session.md +1 -1
- data/documentation/docs/api/element_handle.md +2 -2
- data/documentation/docs/api/frame.md +4 -4
- data/documentation/docs/api/locator.md +3 -3
- data/documentation/docs/api/locator_assertions.md +2 -2
- data/documentation/docs/api/page.md +3 -3
- data/documentation/docs/article/guides/playwright_on_alpine_linux.md +1 -1
- data/lib/playwright/channel_owners/api_request_context.rb +10 -2
- data/lib/playwright/channel_owners/browser_context.rb +1 -1
- data/lib/playwright/channel_owners/cdp_session.rb +2 -2
- data/lib/playwright/channel_owners/tracing.rb +4 -4
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright_api/browser.rb +2 -2
- data/lib/playwright_api/browser_context.rb +6 -6
- data/lib/playwright_api/cdp_session.rb +2 -2
- data/lib/playwright_api/element_handle.rb +3 -3
- data/lib/playwright_api/frame.rb +7 -7
- data/lib/playwright_api/locator.rb +4 -4
- data/lib/playwright_api/locator_assertions.rb +4 -4
- data/lib/playwright_api/page.rb +5 -5
- data/playwright.gemspec +1 -2
- data/sig/playwright.rbs +16 -16
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b11e5851185061f24e17c2d718c4bb66db6a5772836003d8efd64c3cb9548df3
|
|
4
|
+
data.tar.gz: d0dc1b9b7696b0b0a3cc1d213bb78ceb9e5b3da5fb40f437a850f9175f69cabf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a0b8801edcb143026df4605e3fc442c8130f12a62eeb255d6d1f32a550859a416d0ab0345bc9fd36b29c578d430a30845980836a63ae86712dbceee57790136
|
|
7
|
+
data.tar.gz: 833b7f7a7d02de66a3cbac98dd3c06b0a4aaf2f5e58da5461b0cfc1b7fda52933601c27eee970e6048f4534e3c84a00093b0aa3d09efd6860053ac6678842c17
|
|
@@ -207,7 +207,7 @@ Binds the browser to a named pipe or web socket, making it available for other c
|
|
|
207
207
|
## start_tracing
|
|
208
208
|
|
|
209
209
|
```
|
|
210
|
-
def start_tracing(
|
|
210
|
+
def start_tracing(categories: nil, page: nil, path: nil, screenshots: nil)
|
|
211
211
|
```
|
|
212
212
|
|
|
213
213
|
|
|
@@ -493,11 +493,11 @@ See [scrolling](https://playwright.dev/python/docs/input#scrolling) for alternat
|
|
|
493
493
|
|
|
494
494
|
```
|
|
495
495
|
def select_option(
|
|
496
|
+
value: nil,
|
|
496
497
|
element: nil,
|
|
498
|
+
force: nil,
|
|
497
499
|
index: nil,
|
|
498
|
-
value: nil,
|
|
499
500
|
label: nil,
|
|
500
|
-
force: nil,
|
|
501
501
|
noWaitAfter: nil,
|
|
502
502
|
timeout: nil)
|
|
503
503
|
```
|
|
@@ -779,7 +779,7 @@ Returns whether the element is [enabled](https://playwright.dev/python/docs/acti
|
|
|
779
779
|
## hidden?
|
|
780
780
|
|
|
781
781
|
```
|
|
782
|
-
def hidden?(selector, strict: nil
|
|
782
|
+
def hidden?(selector, strict: nil)
|
|
783
783
|
```
|
|
784
784
|
|
|
785
785
|
|
|
@@ -788,7 +788,7 @@ Returns whether the element is hidden, the opposite of [visible](https://playwri
|
|
|
788
788
|
## visible?
|
|
789
789
|
|
|
790
790
|
```
|
|
791
|
-
def visible?(selector, strict: nil
|
|
791
|
+
def visible?(selector, strict: nil)
|
|
792
792
|
```
|
|
793
793
|
|
|
794
794
|
|
|
@@ -909,11 +909,11 @@ returns empty array.
|
|
|
909
909
|
```
|
|
910
910
|
def select_option(
|
|
911
911
|
selector,
|
|
912
|
+
value: nil,
|
|
912
913
|
element: nil,
|
|
914
|
+
force: nil,
|
|
913
915
|
index: nil,
|
|
914
|
-
value: nil,
|
|
915
916
|
label: nil,
|
|
916
|
-
force: nil,
|
|
917
917
|
noWaitAfter: nil,
|
|
918
918
|
strict: nil,
|
|
919
919
|
timeout: nil)
|
|
@@ -128,7 +128,7 @@ Below is the HTML markup and the respective ARIA snapshot:
|
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
An AI-optimized snapshot, controlled by `mode`, is different from a default snapshot:
|
|
131
|
-
1. Includes element references `[ref=e2]`. 2. Does not wait for an element matching the locator, and throws when no elements match. 3. Includes snapshots of `<iframe>`s inside the target.
|
|
131
|
+
1. Includes element references `[ref=e2]`. 2. Does not wait for an element matching the locator, and throws when no elements match. 3. Includes snapshots of `<iframe>`s inside the target. 4. Can omit names that repeat printed descendants, such as a heading containing a link. Names that identify dialogs, landmarks, groups, tables and table headers are retained.
|
|
132
132
|
|
|
133
133
|
## blur
|
|
134
134
|
|
|
@@ -1331,11 +1331,11 @@ See [scrolling](https://playwright.dev/python/docs/input#scrolling) for alternat
|
|
|
1331
1331
|
|
|
1332
1332
|
```
|
|
1333
1333
|
def select_option(
|
|
1334
|
+
value: nil,
|
|
1334
1335
|
element: nil,
|
|
1336
|
+
force: nil,
|
|
1335
1337
|
index: nil,
|
|
1336
|
-
value: nil,
|
|
1337
1338
|
label: nil,
|
|
1338
|
-
force: nil,
|
|
1339
1339
|
noWaitAfter: nil,
|
|
1340
1340
|
timeout: nil)
|
|
1341
1341
|
```
|
|
@@ -137,7 +137,7 @@ The opposite of [LocatorAssertions#to_contain_text](./locator_assertions#to_cont
|
|
|
137
137
|
## not_to_have_accessible_description
|
|
138
138
|
|
|
139
139
|
```ruby
|
|
140
|
-
expect(locator).not_to have_accessible_description(
|
|
140
|
+
expect(locator).not_to have_accessible_description(description, ignoreCase: nil, timeout: nil)
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
|
|
@@ -191,7 +191,7 @@ The opposite of [LocatorAssertions#to_have_count](./locator_assertions#to_have_c
|
|
|
191
191
|
## not_to_have_css
|
|
192
192
|
|
|
193
193
|
```ruby
|
|
194
|
-
expect(locator).not_to have_css(name, value, timeout: nil)
|
|
194
|
+
expect(locator).not_to have_css(name, value, pseudo: nil, timeout: nil)
|
|
195
195
|
```
|
|
196
196
|
|
|
197
197
|
|
|
@@ -42,7 +42,7 @@ page.goto('https://example.com/') # => no print
|
|
|
42
42
|
## add_init_script
|
|
43
43
|
|
|
44
44
|
```
|
|
45
|
-
def add_init_script(
|
|
45
|
+
def add_init_script(script: nil, path: nil)
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
|
|
@@ -1423,11 +1423,11 @@ Returns the buffer with the captured screenshot.
|
|
|
1423
1423
|
```
|
|
1424
1424
|
def select_option(
|
|
1425
1425
|
selector,
|
|
1426
|
+
value: nil,
|
|
1426
1427
|
element: nil,
|
|
1428
|
+
force: nil,
|
|
1427
1429
|
index: nil,
|
|
1428
|
-
value: nil,
|
|
1429
1430
|
label: nil,
|
|
1430
|
-
force: nil,
|
|
1431
1431
|
noWaitAfter: nil,
|
|
1432
1432
|
strict: nil,
|
|
1433
1433
|
timeout: nil)
|
|
@@ -83,7 +83,7 @@ If custom Docker image is preferred, build it as follows:
|
|
|
83
83
|
FROM mcr.microsoft.com/playwright
|
|
84
84
|
|
|
85
85
|
WORKDIR /root
|
|
86
|
-
ARG PLAYWRIGHT_CORE_VERSION=1.
|
|
86
|
+
ARG PLAYWRIGHT_CORE_VERSION=1.65.1
|
|
87
87
|
RUN npm install "playwright-core@$PLAYWRIGHT_CORE_VERSION" && ./node_modules/.bin/playwright-core install
|
|
88
88
|
|
|
89
89
|
ENV PORT 8888
|
|
@@ -147,10 +147,10 @@ module Playwright
|
|
|
147
147
|
form_data = nil
|
|
148
148
|
multipart_data = nil
|
|
149
149
|
post_data_buffer = nil
|
|
150
|
-
if data
|
|
150
|
+
if !data.nil?
|
|
151
151
|
case data
|
|
152
152
|
when String
|
|
153
|
-
if headers_obj
|
|
153
|
+
if json_content_type?(headers_obj)
|
|
154
154
|
json_data = json_parsable?(data) ? data : data.to_json
|
|
155
155
|
else
|
|
156
156
|
post_data_buffer = data
|
|
@@ -192,6 +192,14 @@ module Playwright
|
|
|
192
192
|
APIResponseImpl.new(self, response)
|
|
193
193
|
end
|
|
194
194
|
|
|
195
|
+
private def json_content_type?(headers)
|
|
196
|
+
return false unless headers
|
|
197
|
+
|
|
198
|
+
headers.any? do |key, value|
|
|
199
|
+
key.to_s.downcase == 'content-type' && value.to_s.split(';').first.to_s.strip.downcase == 'application/json'
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
|
|
195
203
|
private def file_payload?(value)
|
|
196
204
|
value.is_a?(Hash) &&
|
|
197
205
|
%w(name mimeType buffer).all? { |key| value.has_key?(key) || value.has_key?(key.to_sym) }
|
|
@@ -89,7 +89,7 @@ module Playwright
|
|
|
89
89
|
private def initialize_har_from_options(record_har_path:, record_har_content:, record_har_omit_content:, record_har_url_filter:, record_har_mode:)
|
|
90
90
|
return unless record_har_path
|
|
91
91
|
|
|
92
|
-
default_policy = record_har_path.
|
|
92
|
+
default_policy = record_har_path.match?(/\.zip\z/i) ? 'attach' : 'embed'
|
|
93
93
|
content_policy = record_har_content || (record_har_omit_content ? 'omit' : default_policy)
|
|
94
94
|
@tracing.send(:record_into_har, record_har_path, nil,
|
|
95
95
|
url: record_har_url_filter,
|
|
@@ -8,8 +8,8 @@ module Playwright
|
|
|
8
8
|
emit(params['method'], params['params'])
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
def send_message(method, params: {})
|
|
12
|
-
@channel.send_message_to_server('send', method: method, params: params)
|
|
11
|
+
def send_message(method, params: {}, timeout: nil)
|
|
12
|
+
@channel.send_message_to_server('send', method: method, params: params, timeout: timeout || 0)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def detach
|
|
@@ -135,11 +135,11 @@ module Playwright
|
|
|
135
135
|
|
|
136
136
|
def start_har(path, content: nil, mode: nil, urlFilter: nil, resourcesDir: nil)
|
|
137
137
|
raise 'HAR recording has already been started' if @har_id
|
|
138
|
-
if resourcesDir && path.
|
|
138
|
+
if resourcesDir && path.match?(/\.zip\z/i)
|
|
139
139
|
raise 'resourcesDir option is not compatible with a .zip har file'
|
|
140
140
|
end
|
|
141
141
|
|
|
142
|
-
default_content = path.
|
|
142
|
+
default_content = path.match?(/\.zip\z/i) ? 'attach' : 'embed'
|
|
143
143
|
@har_id = record_into_har(path, nil,
|
|
144
144
|
url: urlFilter,
|
|
145
145
|
update_content: content || default_content,
|
|
@@ -162,7 +162,7 @@ module Playwright
|
|
|
162
162
|
options = {
|
|
163
163
|
content: update_content || 'attach',
|
|
164
164
|
mode: update_mode || 'minimal',
|
|
165
|
-
harPath: har.
|
|
165
|
+
harPath: har.match?(/\.zip\z/i) ? nil : har,
|
|
166
166
|
resourcesDir: resources_dir,
|
|
167
167
|
}.compact
|
|
168
168
|
|
|
@@ -188,7 +188,7 @@ module Playwright
|
|
|
188
188
|
return unless har_params
|
|
189
189
|
|
|
190
190
|
path = har_params[:path]
|
|
191
|
-
is_zip = path.
|
|
191
|
+
is_zip = path.match?(/\.zip\z/i)
|
|
192
192
|
local_utils = @connection.local_utils
|
|
193
193
|
|
|
194
194
|
if !@connection.remote?
|
data/lib/playwright/version.rb
CHANGED
|
@@ -193,8 +193,8 @@ module Playwright
|
|
|
193
193
|
# page.goto("https://www.google.com")
|
|
194
194
|
# browser.stop_tracing()
|
|
195
195
|
# ```
|
|
196
|
-
def start_tracing(
|
|
197
|
-
wrap_impl(@impl.start_tracing(
|
|
196
|
+
def start_tracing(categories: nil, page: nil, path: nil, screenshots: nil)
|
|
197
|
+
wrap_impl(@impl.start_tracing(categories: unwrap_impl(categories), page: unwrap_impl(page), path: unwrap_impl(path), screenshots: unwrap_impl(screenshots)))
|
|
198
198
|
end
|
|
199
199
|
|
|
200
200
|
#
|
|
@@ -80,8 +80,8 @@ module Playwright
|
|
|
80
80
|
#
|
|
81
81
|
# **NOTE**: The order of evaluation of multiple scripts installed via [`method: BrowserContext.addInitScript`] and
|
|
82
82
|
# [`method: Page.addInitScript`] is not defined.
|
|
83
|
-
def add_init_script(
|
|
84
|
-
wrap_impl(@impl.add_init_script(
|
|
83
|
+
def add_init_script(script: nil, path: nil)
|
|
84
|
+
wrap_impl(@impl.add_init_script(script: unwrap_impl(script), path: unwrap_impl(path)))
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
#
|
|
@@ -341,14 +341,14 @@ module Playwright
|
|
|
341
341
|
# See `WebSocketRoute` for more details and examples.
|
|
342
342
|
#
|
|
343
343
|
# ```python sync
|
|
344
|
-
# def message_handler(
|
|
344
|
+
# def message_handler(server: WebSocketRoute, message: Union[str, bytes]):
|
|
345
345
|
# if message == "to-be-blocked":
|
|
346
346
|
# return
|
|
347
|
-
#
|
|
347
|
+
# server.send(message)
|
|
348
348
|
#
|
|
349
349
|
# def handler(ws: WebSocketRoute):
|
|
350
|
-
# ws.
|
|
351
|
-
# ws.
|
|
350
|
+
# server = ws.connect_to_server()
|
|
351
|
+
# ws.on_message(lambda message: message_handler(server, message))
|
|
352
352
|
#
|
|
353
353
|
# context.route_web_socket("/ws", handler)
|
|
354
354
|
# ```
|
|
@@ -27,8 +27,8 @@ module Playwright
|
|
|
27
27
|
wrap_impl(@impl.detach)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
def send_message(method, params: nil)
|
|
31
|
-
wrap_impl(@impl.send_message(unwrap_impl(method), params: unwrap_impl(params)))
|
|
30
|
+
def send_message(method, params: nil, timeout: nil)
|
|
31
|
+
wrap_impl(@impl.send_message(unwrap_impl(method), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
# -- inherited from EventEmitter --
|
|
@@ -424,14 +424,14 @@ module Playwright
|
|
|
424
424
|
# handle.select_option(value=["red", "green", "blue"])
|
|
425
425
|
# ```
|
|
426
426
|
def select_option(
|
|
427
|
+
value: nil,
|
|
427
428
|
element: nil,
|
|
429
|
+
force: nil,
|
|
428
430
|
index: nil,
|
|
429
|
-
value: nil,
|
|
430
431
|
label: nil,
|
|
431
|
-
force: nil,
|
|
432
432
|
noWaitAfter: nil,
|
|
433
433
|
timeout: nil)
|
|
434
|
-
wrap_impl(@impl.select_option(
|
|
434
|
+
wrap_impl(@impl.select_option(value: unwrap_impl(value), element: unwrap_impl(element), force: unwrap_impl(force), index: unwrap_impl(index), label: unwrap_impl(label), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout)))
|
|
435
435
|
end
|
|
436
436
|
|
|
437
437
|
#
|
data/lib/playwright_api/frame.rb
CHANGED
|
@@ -672,14 +672,14 @@ module Playwright
|
|
|
672
672
|
|
|
673
673
|
#
|
|
674
674
|
# Returns whether the element is hidden, the opposite of [visible](../actionability.md#visible). `selector` that does not match any elements is considered hidden.
|
|
675
|
-
def hidden?(selector, strict: nil
|
|
676
|
-
wrap_impl(@impl.hidden?(unwrap_impl(selector), strict: unwrap_impl(strict)
|
|
675
|
+
def hidden?(selector, strict: nil)
|
|
676
|
+
wrap_impl(@impl.hidden?(unwrap_impl(selector), strict: unwrap_impl(strict)))
|
|
677
677
|
end
|
|
678
678
|
|
|
679
679
|
#
|
|
680
680
|
# Returns whether the element is [visible](../actionability.md#visible). `selector` that does not match any elements is considered not visible.
|
|
681
|
-
def visible?(selector, strict: nil
|
|
682
|
-
wrap_impl(@impl.visible?(unwrap_impl(selector), strict: unwrap_impl(strict)
|
|
681
|
+
def visible?(selector, strict: nil)
|
|
682
|
+
wrap_impl(@impl.visible?(unwrap_impl(selector), strict: unwrap_impl(strict)))
|
|
683
683
|
end
|
|
684
684
|
|
|
685
685
|
#
|
|
@@ -792,15 +792,15 @@ module Playwright
|
|
|
792
792
|
# ```
|
|
793
793
|
def select_option(
|
|
794
794
|
selector,
|
|
795
|
+
value: nil,
|
|
795
796
|
element: nil,
|
|
797
|
+
force: nil,
|
|
796
798
|
index: nil,
|
|
797
|
-
value: nil,
|
|
798
799
|
label: nil,
|
|
799
|
-
force: nil,
|
|
800
800
|
noWaitAfter: nil,
|
|
801
801
|
strict: nil,
|
|
802
802
|
timeout: nil)
|
|
803
|
-
wrap_impl(@impl.select_option(unwrap_impl(selector),
|
|
803
|
+
wrap_impl(@impl.select_option(unwrap_impl(selector), value: unwrap_impl(value), element: unwrap_impl(element), force: unwrap_impl(force), index: unwrap_impl(index), label: unwrap_impl(label), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
|
804
804
|
end
|
|
805
805
|
|
|
806
806
|
#
|
|
@@ -105,7 +105,7 @@ module Playwright
|
|
|
105
105
|
# ```
|
|
106
106
|
#
|
|
107
107
|
# An AI-optimized snapshot, controlled by `mode`, is different from a default snapshot:
|
|
108
|
-
# 1. Includes element references `[ref=e2]`. 2. Does not wait for an element matching the locator, and throws when no elements match. 3. Includes snapshots of `<iframe>`s inside the target.
|
|
108
|
+
# 1. Includes element references `[ref=e2]`. 2. Does not wait for an element matching the locator, and throws when no elements match. 3. Includes snapshots of `<iframe>`s inside the target. 4. Can omit names that repeat printed descendants, such as a heading containing a link. Names that identify dialogs, landmarks, groups, tables and table headers are retained.
|
|
109
109
|
def aria_snapshot(boxes: nil, depth: nil, mode: nil, timeout: nil)
|
|
110
110
|
wrap_impl(@impl.aria_snapshot(boxes: unwrap_impl(boxes), depth: unwrap_impl(depth), mode: unwrap_impl(mode), timeout: unwrap_impl(timeout)))
|
|
111
111
|
end
|
|
@@ -1167,14 +1167,14 @@ module Playwright
|
|
|
1167
1167
|
# element.select_option(value=["red", "green", "blue"])
|
|
1168
1168
|
# ```
|
|
1169
1169
|
def select_option(
|
|
1170
|
+
value: nil,
|
|
1170
1171
|
element: nil,
|
|
1172
|
+
force: nil,
|
|
1171
1173
|
index: nil,
|
|
1172
|
-
value: nil,
|
|
1173
1174
|
label: nil,
|
|
1174
|
-
force: nil,
|
|
1175
1175
|
noWaitAfter: nil,
|
|
1176
1176
|
timeout: nil)
|
|
1177
|
-
wrap_impl(@impl.select_option(
|
|
1177
|
+
wrap_impl(@impl.select_option(value: unwrap_impl(value), element: unwrap_impl(element), force: unwrap_impl(force), index: unwrap_impl(index), label: unwrap_impl(label), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout)))
|
|
1178
1178
|
end
|
|
1179
1179
|
|
|
1180
1180
|
#
|
|
@@ -86,8 +86,8 @@ module Playwright
|
|
|
86
86
|
|
|
87
87
|
#
|
|
88
88
|
# The opposite of [`method: LocatorAssertions.toHaveAccessibleDescription`].
|
|
89
|
-
def not_to_have_accessible_description(
|
|
90
|
-
wrap_impl(@impl.not_to_have_accessible_description(unwrap_impl(
|
|
89
|
+
def not_to_have_accessible_description(description, ignoreCase: nil, timeout: nil)
|
|
90
|
+
wrap_impl(@impl.not_to_have_accessible_description(unwrap_impl(description), ignoreCase: unwrap_impl(ignoreCase), timeout: unwrap_impl(timeout)))
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
#
|
|
@@ -122,8 +122,8 @@ module Playwright
|
|
|
122
122
|
|
|
123
123
|
#
|
|
124
124
|
# The opposite of [`method: LocatorAssertions.toHaveCSS`].
|
|
125
|
-
def not_to_have_css(name, value, timeout: nil)
|
|
126
|
-
wrap_impl(@impl.not_to_have_css(unwrap_impl(name), unwrap_impl(value), timeout: unwrap_impl(timeout)))
|
|
125
|
+
def not_to_have_css(name, value, pseudo: nil, timeout: nil)
|
|
126
|
+
wrap_impl(@impl.not_to_have_css(unwrap_impl(name), unwrap_impl(value), pseudo: unwrap_impl(pseudo), timeout: unwrap_impl(timeout)))
|
|
127
127
|
end
|
|
128
128
|
|
|
129
129
|
#
|
data/lib/playwright_api/page.rb
CHANGED
|
@@ -115,8 +115,8 @@ module Playwright
|
|
|
115
115
|
#
|
|
116
116
|
# **NOTE**: The order of evaluation of multiple scripts installed via [`method: BrowserContext.addInitScript`] and
|
|
117
117
|
# [`method: Page.addInitScript`] is not defined.
|
|
118
|
-
def add_init_script(
|
|
119
|
-
wrap_impl(@impl.add_init_script(
|
|
118
|
+
def add_init_script(script: nil, path: nil)
|
|
119
|
+
wrap_impl(@impl.add_init_script(script: unwrap_impl(script), path: unwrap_impl(path)))
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
#
|
|
@@ -1430,15 +1430,15 @@ module Playwright
|
|
|
1430
1430
|
# ```
|
|
1431
1431
|
def select_option(
|
|
1432
1432
|
selector,
|
|
1433
|
+
value: nil,
|
|
1433
1434
|
element: nil,
|
|
1435
|
+
force: nil,
|
|
1434
1436
|
index: nil,
|
|
1435
|
-
value: nil,
|
|
1436
1437
|
label: nil,
|
|
1437
|
-
force: nil,
|
|
1438
1438
|
noWaitAfter: nil,
|
|
1439
1439
|
strict: nil,
|
|
1440
1440
|
timeout: nil)
|
|
1441
|
-
wrap_impl(@impl.select_option(unwrap_impl(selector),
|
|
1441
|
+
wrap_impl(@impl.select_option(unwrap_impl(selector), value: unwrap_impl(value), element: unwrap_impl(element), force: unwrap_impl(force), index: unwrap_impl(index), label: unwrap_impl(label), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
|
1442
1442
|
end
|
|
1443
1443
|
|
|
1444
1444
|
#
|
data/playwright.gemspec
CHANGED
|
@@ -27,8 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
f.include?(".circleci") ||
|
|
28
28
|
f.start_with?("development/") ||
|
|
29
29
|
f == "AGENTS.md" ||
|
|
30
|
-
f
|
|
31
|
-
f.match(%r{\ACLAUDE/.*\.md\z})
|
|
30
|
+
f.match(%r{\AAGENTS/.*\.md\z})
|
|
32
31
|
end
|
|
33
32
|
end + `find lib/playwright_api -name *.rb -type f`.split("\n") + `find sig -name *.rbs -type f`.split("\n")
|
|
34
33
|
spec.bindir = 'exe'
|
data/sig/playwright.rbs
CHANGED
|
@@ -122,7 +122,7 @@ module Playwright
|
|
|
122
122
|
def query_selector_all: (String selector) -> Array[untyped]
|
|
123
123
|
def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?style: String, ?timeout: Float, ?type: ("png" | "jpeg" | "webp")) -> String
|
|
124
124
|
def scroll_into_view_if_needed: (?timeout: Float) -> void
|
|
125
|
-
def select_option: (?
|
|
125
|
+
def select_option: (?value: (String | Array[untyped]), ?element: (ElementHandle | Array[untyped]), ?force: bool, ?index: (Integer | Array[untyped]), ?label: (String | Array[untyped]), ?noWaitAfter: bool, ?timeout: Float) -> Array[untyped]
|
|
126
126
|
def select_text: (?force: bool, ?timeout: Float) -> void
|
|
127
127
|
def set_checked: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
|
|
128
128
|
def checked=: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
|
|
@@ -181,8 +181,8 @@ module Playwright
|
|
|
181
181
|
def disabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
|
|
182
182
|
def editable?: (String selector, ?strict: bool, ?timeout: Float) -> bool
|
|
183
183
|
def enabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
|
|
184
|
-
def hidden?: (String selector, ?strict: bool
|
|
185
|
-
def visible?: (String selector, ?strict: bool
|
|
184
|
+
def hidden?: (String selector, ?strict: bool) -> bool
|
|
185
|
+
def visible?: (String selector, ?strict: bool) -> bool
|
|
186
186
|
def locator: (String selector, ?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
|
|
187
187
|
def name: -> String
|
|
188
188
|
def page: -> Page
|
|
@@ -190,7 +190,7 @@ module Playwright
|
|
|
190
190
|
def press: (String selector, String key, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
|
|
191
191
|
def query_selector: (String selector, ?strict: bool) -> (nil | ElementHandle)
|
|
192
192
|
def query_selector_all: (String selector) -> Array[untyped]
|
|
193
|
-
def select_option: (String selector, ?
|
|
193
|
+
def select_option: (String selector, ?value: (String | Array[untyped]), ?element: (ElementHandle | Array[untyped]), ?force: bool, ?index: (Integer | Array[untyped]), ?label: (String | Array[untyped]), ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> Array[untyped]
|
|
194
194
|
def set_checked: (String selector, bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
|
|
195
195
|
def set_content: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
|
|
196
196
|
def content=: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
|
|
@@ -267,7 +267,7 @@ module Playwright
|
|
|
267
267
|
end
|
|
268
268
|
|
|
269
269
|
class Page
|
|
270
|
-
def add_init_script: (?path: (String | File)
|
|
270
|
+
def add_init_script: (?script: String, ?path: (String | File)) -> untyped
|
|
271
271
|
def add_script_tag: (?content: String, ?path: (String | File), ?type: String, ?url: String) -> ElementHandle
|
|
272
272
|
def add_style_tag: (?content: String, ?path: (String | File), ?url: String) -> ElementHandle
|
|
273
273
|
def bring_to_front: -> void
|
|
@@ -332,10 +332,10 @@ module Playwright
|
|
|
332
332
|
def query_selector_all: (String selector) -> Array[untyped]
|
|
333
333
|
def requests: -> Array[untyped]
|
|
334
334
|
def reload: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
|
|
335
|
-
def route: ((String | Regexp | function) url, function handler, ?times: Integer) -> untyped
|
|
335
|
+
def route: ((String | Regexp | function) url, (function | function) handler, ?times: Integer) -> untyped
|
|
336
336
|
def route_from_har: ((String | File) har, ?notFound: ("abort" | "fallback"), ?update: bool, ?updateContent: ("embed" | "attach"), ?updateMode: ("full" | "minimal"), ?url: (String | Regexp)) -> void
|
|
337
337
|
def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?clip: Hash[untyped, untyped], ?fullPage: bool, ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?style: String, ?timeout: Float, ?type: ("png" | "jpeg" | "webp")) -> String
|
|
338
|
-
def select_option: (String selector, ?
|
|
338
|
+
def select_option: (String selector, ?value: (String | Array[untyped]), ?element: (ElementHandle | Array[untyped]), ?force: bool, ?index: (Integer | Array[untyped]), ?label: (String | Array[untyped]), ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> Array[untyped]
|
|
339
339
|
def set_checked: (String selector, bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
|
|
340
340
|
def set_content: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
|
|
341
341
|
def content=: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
|
|
@@ -355,7 +355,7 @@ module Playwright
|
|
|
355
355
|
def type: (String selector, String text, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
|
|
356
356
|
def uncheck: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?strict: bool, ?timeout: Float, ?trial: bool) -> void
|
|
357
357
|
def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
|
|
358
|
-
def unroute: ((String | Regexp | function) url, ?handler: function) -> void
|
|
358
|
+
def unroute: ((String | Regexp | function) url, ?handler: (function | function)) -> void
|
|
359
359
|
def url: -> String
|
|
360
360
|
def video: -> (nil | untyped)
|
|
361
361
|
def viewport_size: -> (nil | Hash[untyped, untyped])
|
|
@@ -390,7 +390,7 @@ module Playwright
|
|
|
390
390
|
|
|
391
391
|
class BrowserContext
|
|
392
392
|
def add_cookies: (Array[untyped] cookies) -> void
|
|
393
|
-
def add_init_script: (?path: (String | File)
|
|
393
|
+
def add_init_script: (?script: String, ?path: (String | File)) -> untyped
|
|
394
394
|
def background_pages: -> Array[untyped]
|
|
395
395
|
def browser: -> (nil | Browser)
|
|
396
396
|
def clear_cookies: (?domain: (String | Regexp), ?name: (String | Regexp), ?path: (String | Regexp)) -> void
|
|
@@ -404,7 +404,7 @@ module Playwright
|
|
|
404
404
|
def new_cdp_session: ((Page | Frame) page) -> CDPSession
|
|
405
405
|
def new_page: () ?{ (Page) -> untyped } -> Page
|
|
406
406
|
def pages: -> Array[untyped]
|
|
407
|
-
def route: ((String | Regexp | function) url, function handler, ?times: Integer) -> untyped
|
|
407
|
+
def route: ((String | Regexp | function) url, (function | function) handler, ?times: Integer) -> untyped
|
|
408
408
|
def route_from_har: ((String | File) har, ?notFound: ("abort" | "fallback"), ?update: bool, ?updateContent: ("embed" | "attach"), ?updateMode: ("full" | "minimal"), ?url: (String | Regexp)) -> void
|
|
409
409
|
def service_workers: -> Array[untyped]
|
|
410
410
|
def set_default_navigation_timeout: (Float timeout) -> void
|
|
@@ -421,7 +421,7 @@ module Playwright
|
|
|
421
421
|
def set_storage_state: (((String | File) | Hash[untyped, untyped]) storageState) -> void
|
|
422
422
|
def storage_state=: (((String | File) | Hash[untyped, untyped]) storageState) -> void
|
|
423
423
|
def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
|
|
424
|
-
def unroute: ((String | Regexp | function) url, ?handler: function) -> void
|
|
424
|
+
def unroute: ((String | Regexp | function) url, ?handler: (function | function)) -> void
|
|
425
425
|
def expect_console_message: (?predicate: function, ?timeout: Float) { () -> void } -> ConsoleMessage
|
|
426
426
|
def expect_event: (String event, ?predicate: function, ?timeout: Float) { () -> void } -> untyped
|
|
427
427
|
def expect_page: (?predicate: function, ?timeout: Float) { () -> void } -> Page
|
|
@@ -434,7 +434,7 @@ module Playwright
|
|
|
434
434
|
|
|
435
435
|
class CDPSession
|
|
436
436
|
def detach: -> void
|
|
437
|
-
def send_message: (String method, ?params: Hash[untyped, untyped]) -> Hash[untyped, untyped]
|
|
437
|
+
def send_message: (String method, ?params: Hash[untyped, untyped], ?timeout: Float) -> Hash[untyped, untyped]
|
|
438
438
|
end
|
|
439
439
|
|
|
440
440
|
class Browser
|
|
@@ -446,7 +446,7 @@ module Playwright
|
|
|
446
446
|
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_fps: Integer, ?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
|
|
447
447
|
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_fps: Integer, ?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
|
|
448
448
|
def bind: (String title, ?host: String, ?port: Integer, ?workspaceDir: String) -> Hash[untyped, untyped]
|
|
449
|
-
def start_tracing: (?
|
|
449
|
+
def start_tracing: (?categories: Array[untyped], ?page: Page, ?path: (String | File), ?screenshots: bool) -> void
|
|
450
450
|
def stop_tracing: -> String
|
|
451
451
|
def unbind: -> void
|
|
452
452
|
def version: -> String
|
|
@@ -542,7 +542,7 @@ module Playwright
|
|
|
542
542
|
def press_sequentially: (String text, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
|
|
543
543
|
def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?style: String, ?timeout: Float, ?type: ("png" | "jpeg" | "webp")) -> String
|
|
544
544
|
def scroll_into_view_if_needed: (?timeout: Float) -> void
|
|
545
|
-
def select_option: (?
|
|
545
|
+
def select_option: (?value: (String | Array[untyped]), ?element: (ElementHandle | Array[untyped]), ?force: bool, ?index: (Integer | Array[untyped]), ?label: (String | Array[untyped]), ?noWaitAfter: bool, ?timeout: Float) -> Array[untyped]
|
|
546
546
|
def select_text: (?force: bool, ?timeout: Float) -> void
|
|
547
547
|
def set_checked: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
|
|
548
548
|
def checked=: (bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?scroll: ("auto" | "none"), ?timeout: Float, ?trial: bool) -> void
|
|
@@ -624,13 +624,13 @@ module Playwright
|
|
|
624
624
|
def not_to_be_visible: (?timeout: Float, ?visible: bool) -> void
|
|
625
625
|
def not_to_contain_class: ((String | Array[untyped]) expected, ?timeout: Float) -> void
|
|
626
626
|
def not_to_contain_text: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?ignoreCase: bool, ?timeout: Float, ?useInnerText: bool) -> void
|
|
627
|
-
def not_to_have_accessible_description: ((String | Regexp)
|
|
627
|
+
def not_to_have_accessible_description: ((String | Regexp) description, ?ignoreCase: bool, ?timeout: Float) -> void
|
|
628
628
|
def not_to_have_accessible_error_message: ((String | Regexp) errorMessage, ?ignoreCase: bool, ?timeout: Float) -> void
|
|
629
629
|
def not_to_have_accessible_name: ((String | Regexp) name, ?ignoreCase: bool, ?timeout: Float) -> void
|
|
630
630
|
def not_to_have_attribute: (String name, ?value: (String | Regexp), ?ignoreCase: bool, ?timeout: Float) -> void
|
|
631
631
|
def not_to_have_class: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?timeout: Float) -> void
|
|
632
632
|
def not_to_have_count: (Integer count, ?timeout: Float) -> void
|
|
633
|
-
def not_to_have_css: (String name, (String | Regexp) value, ?timeout: Float) -> void
|
|
633
|
+
def not_to_have_css: (String name, (String | Regexp) value, ?pseudo: ("before" | "after"), ?timeout: Float) -> void
|
|
634
634
|
def not_to_have_id: ((String | Regexp) id, ?timeout: Float) -> void
|
|
635
635
|
def not_to_have_js_property: (String name, untyped value, ?timeout: Float) -> void
|
|
636
636
|
def not_to_have_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?timeout: Float) -> void
|
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.65.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- YusukeIwaki
|
|
@@ -446,5 +446,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
446
446
|
requirements: []
|
|
447
447
|
rubygems_version: 3.6.9
|
|
448
448
|
specification_version: 4
|
|
449
|
-
summary: The Ruby binding of playwright driver 1.
|
|
449
|
+
summary: The Ruby binding of playwright driver 1.65.1
|
|
450
450
|
test_files: []
|