playwright-ruby-client 1.25.0 → 1.26.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 +7 -0
- data/documentation/docs/api/browser_type.md +8 -0
- data/documentation/docs/api/frame_locator.md +1 -1
- data/documentation/docs/api/page.md +1 -1
- data/documentation/src/components/HomepageFeatures.js +1 -1
- data/lib/playwright/channel_owners/api_request_context.rb +23 -120
- data/lib/playwright/channel_owners/browser_context.rb +4 -5
- data/lib/playwright/channel_owners/dialog.rb +1 -1
- data/lib/playwright/channel_owners/page.rb +5 -6
- data/lib/playwright/route_handler.rb +2 -2
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright_api/api_request_context.rb +14 -7
- data/lib/playwright_api/browser_type.rb +6 -0
- data/lib/playwright_api/frame_locator.rb +1 -1
- data/lib/playwright_api/page.rb +1 -1
- 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: beca54a9f8e488cefb33f9266bd227bdb002ea5e379f6525733375f30a26aad2
|
4
|
+
data.tar.gz: a8cb017751e740755cb92a7525a59afde927b9393ed13d71e0af2797c857496e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7ede551835e7916acf830ef26664cd6421910c966d96f9e85c599383c48fc7707467f2d095a848c6f23071310e6072cde47b7412b4d83d1f381373dc42b6011
|
7
|
+
data.tar.gz: c4aa082a27871b37b64236c0fc40c17083884696fb2ceef8a3bd9e6c72d5089081a81ac616fd1a8116cf7052575888fa63abc47866d2cff413b21aee9a695f10
|
@@ -66,6 +66,7 @@ def delete(
|
|
66
66
|
form: nil,
|
67
67
|
headers: nil,
|
68
68
|
ignoreHTTPSErrors: nil,
|
69
|
+
maxRedirects: nil,
|
69
70
|
multipart: nil,
|
70
71
|
params: nil,
|
71
72
|
timeout: nil)
|
@@ -95,6 +96,7 @@ def fetch(
|
|
95
96
|
form: nil,
|
96
97
|
headers: nil,
|
97
98
|
ignoreHTTPSErrors: nil,
|
99
|
+
maxRedirects: nil,
|
98
100
|
method: nil,
|
99
101
|
multipart: nil,
|
100
102
|
params: nil,
|
@@ -112,6 +114,7 @@ def get(
|
|
112
114
|
failOnStatusCode: nil,
|
113
115
|
headers: nil,
|
114
116
|
ignoreHTTPSErrors: nil,
|
117
|
+
maxRedirects: nil,
|
115
118
|
params: nil,
|
116
119
|
timeout: nil)
|
117
120
|
```
|
@@ -128,6 +131,7 @@ def head(
|
|
128
131
|
failOnStatusCode: nil,
|
129
132
|
headers: nil,
|
130
133
|
ignoreHTTPSErrors: nil,
|
134
|
+
maxRedirects: nil,
|
131
135
|
params: nil,
|
132
136
|
timeout: nil)
|
133
137
|
```
|
@@ -146,6 +150,7 @@ def patch(
|
|
146
150
|
form: nil,
|
147
151
|
headers: nil,
|
148
152
|
ignoreHTTPSErrors: nil,
|
153
|
+
maxRedirects: nil,
|
149
154
|
multipart: nil,
|
150
155
|
params: nil,
|
151
156
|
timeout: nil)
|
@@ -165,6 +170,7 @@ def post(
|
|
165
170
|
form: nil,
|
166
171
|
headers: nil,
|
167
172
|
ignoreHTTPSErrors: nil,
|
173
|
+
maxRedirects: nil,
|
168
174
|
multipart: nil,
|
169
175
|
params: nil,
|
170
176
|
timeout: nil)
|
@@ -184,6 +190,7 @@ def put(
|
|
184
190
|
form: nil,
|
185
191
|
headers: nil,
|
186
192
|
ignoreHTTPSErrors: nil,
|
193
|
+
maxRedirects: nil,
|
187
194
|
multipart: nil,
|
188
195
|
params: nil,
|
189
196
|
timeout: nil)
|
@@ -37,6 +37,14 @@ The default browser context is accessible via [Browser#contexts](./browser#conte
|
|
37
37
|
|
38
38
|
> NOTE: Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.
|
39
39
|
|
40
|
+
```ruby
|
41
|
+
browser = playwright.chromium.connect_over_cdp("http://localhost:9222")
|
42
|
+
default_context = browser.contexts.first
|
43
|
+
page = default_context.pages.first
|
44
|
+
```
|
45
|
+
|
46
|
+
|
47
|
+
|
40
48
|
## executable_path
|
41
49
|
|
42
50
|
```
|
@@ -1541,7 +1541,7 @@ Returns when element specified by selector satisfies `state` option. Returns `nu
|
|
1541
1541
|
`detached`.
|
1542
1542
|
|
1543
1543
|
> NOTE: Playwright automatically waits for element to be ready before performing an action. Using [Locator](./locator) objects and
|
1544
|
-
web-first assertions
|
1544
|
+
web-first assertions makes the code wait-for-selector-free.
|
1545
1545
|
|
1546
1546
|
Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If at
|
1547
1547
|
the moment of calling the method `selector` already satisfies the condition, the method will return immediately. If the
|
@@ -10,136 +10,34 @@ module Playwright
|
|
10
10
|
@channel.send_message_to_server('dispose')
|
11
11
|
end
|
12
12
|
|
13
|
-
def delete(
|
14
|
-
|
15
|
-
|
16
|
-
failOnStatusCode: nil,
|
17
|
-
form: nil,
|
18
|
-
headers: nil,
|
19
|
-
ignoreHTTPSErrors: nil,
|
20
|
-
multipart: nil,
|
21
|
-
params: nil,
|
22
|
-
timeout: nil)
|
23
|
-
fetch(
|
24
|
-
url,
|
25
|
-
method: 'DELETE',
|
26
|
-
data: data,
|
27
|
-
failOnStatusCode: failOnStatusCode,
|
28
|
-
form: form,
|
29
|
-
headers: headers,
|
30
|
-
ignoreHTTPSErrors: ignoreHTTPSErrors,
|
31
|
-
multipart: multipart,
|
32
|
-
params: params,
|
33
|
-
timeout: timeout,
|
34
|
-
)
|
13
|
+
def delete(url, **options)
|
14
|
+
fetch_options = options.merge(method: 'DELETE')
|
15
|
+
fetch(url, **fetch_options)
|
35
16
|
end
|
36
17
|
|
37
|
-
def head(
|
38
|
-
|
39
|
-
|
40
|
-
headers: nil,
|
41
|
-
ignoreHTTPSErrors: nil,
|
42
|
-
params: nil,
|
43
|
-
timeout: nil)
|
44
|
-
fetch(
|
45
|
-
url,
|
46
|
-
method: 'HEAD',
|
47
|
-
failOnStatusCode: failOnStatusCode,
|
48
|
-
headers: headers,
|
49
|
-
ignoreHTTPSErrors: ignoreHTTPSErrors,
|
50
|
-
params: params,
|
51
|
-
timeout: timeout,
|
52
|
-
)
|
18
|
+
def head(url, **options)
|
19
|
+
fetch_options = options.merge(method: 'HEAD')
|
20
|
+
fetch(url, **fetch_options)
|
53
21
|
end
|
54
22
|
|
55
|
-
def get(
|
56
|
-
|
57
|
-
|
58
|
-
headers: nil,
|
59
|
-
ignoreHTTPSErrors: nil,
|
60
|
-
params: nil,
|
61
|
-
timeout: nil)
|
62
|
-
fetch(
|
63
|
-
url,
|
64
|
-
method: 'GET',
|
65
|
-
failOnStatusCode: failOnStatusCode,
|
66
|
-
headers: headers,
|
67
|
-
ignoreHTTPSErrors: ignoreHTTPSErrors,
|
68
|
-
params: params,
|
69
|
-
timeout: timeout,
|
70
|
-
)
|
23
|
+
def get(url, **options)
|
24
|
+
fetch_options = options.merge(method: 'GET')
|
25
|
+
fetch(url, **fetch_options)
|
71
26
|
end
|
72
27
|
|
73
|
-
def patch(
|
74
|
-
|
75
|
-
|
76
|
-
failOnStatusCode: nil,
|
77
|
-
form: nil,
|
78
|
-
headers: nil,
|
79
|
-
ignoreHTTPSErrors: nil,
|
80
|
-
multipart: nil,
|
81
|
-
params: nil,
|
82
|
-
timeout: nil)
|
83
|
-
fetch(
|
84
|
-
url,
|
85
|
-
method: 'PATCH',
|
86
|
-
data: data,
|
87
|
-
failOnStatusCode: failOnStatusCode,
|
88
|
-
form: form,
|
89
|
-
headers: headers,
|
90
|
-
ignoreHTTPSErrors: ignoreHTTPSErrors,
|
91
|
-
multipart: multipart,
|
92
|
-
params: params,
|
93
|
-
timeout: timeout,
|
94
|
-
)
|
28
|
+
def patch(url, **options)
|
29
|
+
fetch_options = options.merge(method: 'PATCH')
|
30
|
+
fetch(url, **fetch_options)
|
95
31
|
end
|
96
32
|
|
97
|
-
def put(
|
98
|
-
|
99
|
-
|
100
|
-
failOnStatusCode: nil,
|
101
|
-
form: nil,
|
102
|
-
headers: nil,
|
103
|
-
ignoreHTTPSErrors: nil,
|
104
|
-
multipart: nil,
|
105
|
-
params: nil,
|
106
|
-
timeout: nil)
|
107
|
-
fetch(
|
108
|
-
url,
|
109
|
-
method: 'PUT',
|
110
|
-
data: data,
|
111
|
-
failOnStatusCode: failOnStatusCode,
|
112
|
-
form: form,
|
113
|
-
headers: headers,
|
114
|
-
ignoreHTTPSErrors: ignoreHTTPSErrors,
|
115
|
-
multipart: multipart,
|
116
|
-
params: params,
|
117
|
-
timeout: timeout,
|
118
|
-
)
|
33
|
+
def put(url, **options)
|
34
|
+
fetch_options = options.merge(method: 'PUT')
|
35
|
+
fetch(url, **fetch_options)
|
119
36
|
end
|
120
37
|
|
121
|
-
def post(
|
122
|
-
|
123
|
-
|
124
|
-
failOnStatusCode: nil,
|
125
|
-
form: nil,
|
126
|
-
headers: nil,
|
127
|
-
ignoreHTTPSErrors: nil,
|
128
|
-
multipart: nil,
|
129
|
-
params: nil,
|
130
|
-
timeout: nil)
|
131
|
-
fetch(
|
132
|
-
url,
|
133
|
-
method: 'POST',
|
134
|
-
data: data,
|
135
|
-
failOnStatusCode: failOnStatusCode,
|
136
|
-
form: form,
|
137
|
-
headers: headers,
|
138
|
-
ignoreHTTPSErrors: ignoreHTTPSErrors,
|
139
|
-
multipart: multipart,
|
140
|
-
params: params,
|
141
|
-
timeout: timeout,
|
142
|
-
)
|
38
|
+
def post(url, **options)
|
39
|
+
fetch_options = options.merge(method: 'POST')
|
40
|
+
fetch(url, **fetch_options)
|
143
41
|
end
|
144
42
|
|
145
43
|
def fetch(
|
@@ -149,6 +47,7 @@ module Playwright
|
|
149
47
|
form: nil,
|
150
48
|
headers: nil,
|
151
49
|
ignoreHTTPSErrors: nil,
|
50
|
+
maxRedirects: nil,
|
152
51
|
method: nil,
|
153
52
|
multipart: nil,
|
154
53
|
params: nil,
|
@@ -160,6 +59,9 @@ module Playwright
|
|
160
59
|
if [data, form, multipart].compact.count > 1
|
161
60
|
raise ArgumentError.new("Only one of 'data', 'form' or 'multipart' can be specified")
|
162
61
|
end
|
62
|
+
if maxRedirects && maxRedirects < 0
|
63
|
+
raise ArgumentError.new("'maxRedirects' should be greater than or equal to '0'")
|
64
|
+
end
|
163
65
|
|
164
66
|
request = urlOrRequest.is_a?(ChannelOwners::Request) ? urlOrRequest : nil
|
165
67
|
headers_obj = headers || request&.headers
|
@@ -212,6 +114,7 @@ module Playwright
|
|
212
114
|
fetch_params[:timeout] = timeout
|
213
115
|
fetch_params[:failOnStatusCode] = failOnStatusCode
|
214
116
|
fetch_params[:ignoreHTTPSErrors] = ignoreHTTPSErrors
|
117
|
+
fetch_params[:maxRedirects] = maxRedirects
|
215
118
|
fetch_params.compact!
|
216
119
|
response = @channel.send_message_to_server('fetch', fetch_params)
|
217
120
|
|
@@ -26,7 +26,7 @@ module Playwright
|
|
26
26
|
@channel.on('page', ->(params) { on_page(ChannelOwners::Page.from(params['page']) )})
|
27
27
|
@channel.on('route', ->(params) {
|
28
28
|
Concurrent::Promises.future {
|
29
|
-
on_route(ChannelOwners::Route.from(params['route'])
|
29
|
+
on_route(ChannelOwners::Route.from(params['route']))
|
30
30
|
}.rescue do |err|
|
31
31
|
puts err, err.backtrace
|
32
32
|
end
|
@@ -83,22 +83,21 @@ module Playwright
|
|
83
83
|
emit(Events::BrowserContext::BackgroundPage, page)
|
84
84
|
end
|
85
85
|
|
86
|
-
private def on_route(route
|
86
|
+
private def on_route(route)
|
87
87
|
# It is not desired to use PlaywrightApi.wrap directly.
|
88
88
|
# However it is a little difficult to define wrapper for `handler` parameter in generate_api.
|
89
89
|
# Just a workaround...
|
90
90
|
wrapped_route = PlaywrightApi.wrap(route)
|
91
|
-
wrapped_request = PlaywrightApi.wrap(request)
|
92
91
|
|
93
92
|
handled = @routes.any? do |handler_entry|
|
94
|
-
next false unless handler_entry.match?(request.url)
|
93
|
+
next false unless handler_entry.match?(route.request.url)
|
95
94
|
|
96
95
|
promise = Concurrent::Promises.resolvable_future
|
97
96
|
route.send(:set_handling_future, promise)
|
98
97
|
|
99
98
|
promise_handled = Concurrent::Promises.zip(
|
100
99
|
promise,
|
101
|
-
handler_entry.async_handle(wrapped_route
|
100
|
+
handler_entry.async_handle(wrapped_route)
|
102
101
|
).value!.first
|
103
102
|
|
104
103
|
promise_handled
|
@@ -58,7 +58,7 @@ module Playwright
|
|
58
58
|
})
|
59
59
|
@channel.on('route', ->(params) {
|
60
60
|
Concurrent::Promises.future {
|
61
|
-
on_route(ChannelOwners::Route.from(params['route'])
|
61
|
+
on_route(ChannelOwners::Route.from(params['route']))
|
62
62
|
}.rescue do |err|
|
63
63
|
puts err, err.backtrace
|
64
64
|
end
|
@@ -93,22 +93,21 @@ module Playwright
|
|
93
93
|
emit(Events::Page::FrameDetached, frame)
|
94
94
|
end
|
95
95
|
|
96
|
-
private def on_route(route
|
96
|
+
private def on_route(route)
|
97
97
|
# It is not desired to use PlaywrightApi.wrap directly.
|
98
98
|
# However it is a little difficult to define wrapper for `handler` parameter in generate_api.
|
99
99
|
# Just a workaround...
|
100
100
|
wrapped_route = PlaywrightApi.wrap(route)
|
101
|
-
wrapped_request = PlaywrightApi.wrap(request)
|
102
101
|
|
103
102
|
handled = @routes.any? do |handler_entry|
|
104
|
-
next false unless handler_entry.match?(request.url)
|
103
|
+
next false unless handler_entry.match?(route.request.url)
|
105
104
|
|
106
105
|
promise = Concurrent::Promises.resolvable_future
|
107
106
|
route.send(:set_handling_future, promise)
|
108
107
|
|
109
108
|
promise_handled = Concurrent::Promises.zip(
|
110
109
|
promise,
|
111
|
-
handler_entry.async_handle(wrapped_route
|
110
|
+
handler_entry.async_handle(wrapped_route)
|
112
111
|
).value!.first
|
113
112
|
|
114
113
|
promise_handled
|
@@ -120,7 +119,7 @@ module Playwright
|
|
120
119
|
end
|
121
120
|
|
122
121
|
unless handled
|
123
|
-
@browser_context.send(:on_route, route
|
122
|
+
@browser_context.send(:on_route, route)
|
124
123
|
end
|
125
124
|
end
|
126
125
|
|
@@ -47,10 +47,10 @@ module Playwright
|
|
47
47
|
@url_matcher.match?(url)
|
48
48
|
end
|
49
49
|
|
50
|
-
def async_handle(route
|
50
|
+
def async_handle(route)
|
51
51
|
@counter.increment
|
52
52
|
|
53
|
-
Concurrent::Promises.future { @handler.call(route, request) }.rescue do |err|
|
53
|
+
Concurrent::Promises.future { @handler.call(route, route.request) }.rescue do |err|
|
54
54
|
puts err, err.backtrace
|
55
55
|
end
|
56
56
|
end
|
data/lib/playwright/version.rb
CHANGED
@@ -75,10 +75,11 @@ module Playwright
|
|
75
75
|
form: nil,
|
76
76
|
headers: nil,
|
77
77
|
ignoreHTTPSErrors: nil,
|
78
|
+
maxRedirects: nil,
|
78
79
|
multipart: nil,
|
79
80
|
params: nil,
|
80
81
|
timeout: nil)
|
81
|
-
wrap_impl(@impl.delete(unwrap_impl(url), data: unwrap_impl(data), failOnStatusCode: unwrap_impl(failOnStatusCode), form: unwrap_impl(form), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), multipart: unwrap_impl(multipart), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
82
|
+
wrap_impl(@impl.delete(unwrap_impl(url), data: unwrap_impl(data), failOnStatusCode: unwrap_impl(failOnStatusCode), form: unwrap_impl(form), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), maxRedirects: unwrap_impl(maxRedirects), multipart: unwrap_impl(multipart), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
82
83
|
end
|
83
84
|
|
84
85
|
# All responses returned by [`method: APIRequestContext.get`] and similar methods are stored in the memory, so that you
|
@@ -97,11 +98,12 @@ module Playwright
|
|
97
98
|
form: nil,
|
98
99
|
headers: nil,
|
99
100
|
ignoreHTTPSErrors: nil,
|
101
|
+
maxRedirects: nil,
|
100
102
|
method: nil,
|
101
103
|
multipart: nil,
|
102
104
|
params: nil,
|
103
105
|
timeout: nil)
|
104
|
-
wrap_impl(@impl.fetch(unwrap_impl(urlOrRequest), data: unwrap_impl(data), failOnStatusCode: unwrap_impl(failOnStatusCode), form: unwrap_impl(form), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), method: unwrap_impl(method), multipart: unwrap_impl(multipart), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
106
|
+
wrap_impl(@impl.fetch(unwrap_impl(urlOrRequest), data: unwrap_impl(data), failOnStatusCode: unwrap_impl(failOnStatusCode), form: unwrap_impl(form), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), maxRedirects: unwrap_impl(maxRedirects), method: unwrap_impl(method), multipart: unwrap_impl(multipart), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
105
107
|
end
|
106
108
|
|
107
109
|
# Sends HTTP(S) [GET](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request and returns its response. The
|
@@ -112,9 +114,10 @@ module Playwright
|
|
112
114
|
failOnStatusCode: nil,
|
113
115
|
headers: nil,
|
114
116
|
ignoreHTTPSErrors: nil,
|
117
|
+
maxRedirects: nil,
|
115
118
|
params: nil,
|
116
119
|
timeout: nil)
|
117
|
-
wrap_impl(@impl.get(unwrap_impl(url), failOnStatusCode: unwrap_impl(failOnStatusCode), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
120
|
+
wrap_impl(@impl.get(unwrap_impl(url), failOnStatusCode: unwrap_impl(failOnStatusCode), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), maxRedirects: unwrap_impl(maxRedirects), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
118
121
|
end
|
119
122
|
|
120
123
|
# Sends HTTP(S) [HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) request and returns its response.
|
@@ -125,9 +128,10 @@ module Playwright
|
|
125
128
|
failOnStatusCode: nil,
|
126
129
|
headers: nil,
|
127
130
|
ignoreHTTPSErrors: nil,
|
131
|
+
maxRedirects: nil,
|
128
132
|
params: nil,
|
129
133
|
timeout: nil)
|
130
|
-
wrap_impl(@impl.head(unwrap_impl(url), failOnStatusCode: unwrap_impl(failOnStatusCode), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
134
|
+
wrap_impl(@impl.head(unwrap_impl(url), failOnStatusCode: unwrap_impl(failOnStatusCode), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), maxRedirects: unwrap_impl(maxRedirects), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
131
135
|
end
|
132
136
|
|
133
137
|
# Sends HTTP(S) [PATCH](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) request and returns its response.
|
@@ -140,10 +144,11 @@ module Playwright
|
|
140
144
|
form: nil,
|
141
145
|
headers: nil,
|
142
146
|
ignoreHTTPSErrors: nil,
|
147
|
+
maxRedirects: nil,
|
143
148
|
multipart: nil,
|
144
149
|
params: nil,
|
145
150
|
timeout: nil)
|
146
|
-
wrap_impl(@impl.patch(unwrap_impl(url), data: unwrap_impl(data), failOnStatusCode: unwrap_impl(failOnStatusCode), form: unwrap_impl(form), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), multipart: unwrap_impl(multipart), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
151
|
+
wrap_impl(@impl.patch(unwrap_impl(url), data: unwrap_impl(data), failOnStatusCode: unwrap_impl(failOnStatusCode), form: unwrap_impl(form), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), maxRedirects: unwrap_impl(maxRedirects), multipart: unwrap_impl(multipart), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
147
152
|
end
|
148
153
|
|
149
154
|
# Sends HTTP(S) [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request and returns its response.
|
@@ -156,10 +161,11 @@ module Playwright
|
|
156
161
|
form: nil,
|
157
162
|
headers: nil,
|
158
163
|
ignoreHTTPSErrors: nil,
|
164
|
+
maxRedirects: nil,
|
159
165
|
multipart: nil,
|
160
166
|
params: nil,
|
161
167
|
timeout: nil)
|
162
|
-
wrap_impl(@impl.post(unwrap_impl(url), data: unwrap_impl(data), failOnStatusCode: unwrap_impl(failOnStatusCode), form: unwrap_impl(form), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), multipart: unwrap_impl(multipart), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
168
|
+
wrap_impl(@impl.post(unwrap_impl(url), data: unwrap_impl(data), failOnStatusCode: unwrap_impl(failOnStatusCode), form: unwrap_impl(form), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), maxRedirects: unwrap_impl(maxRedirects), multipart: unwrap_impl(multipart), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
163
169
|
end
|
164
170
|
|
165
171
|
# Sends HTTP(S) [PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) request and returns its response. The
|
@@ -172,10 +178,11 @@ module Playwright
|
|
172
178
|
form: nil,
|
173
179
|
headers: nil,
|
174
180
|
ignoreHTTPSErrors: nil,
|
181
|
+
maxRedirects: nil,
|
175
182
|
multipart: nil,
|
176
183
|
params: nil,
|
177
184
|
timeout: nil)
|
178
|
-
wrap_impl(@impl.put(unwrap_impl(url), data: unwrap_impl(data), failOnStatusCode: unwrap_impl(failOnStatusCode), form: unwrap_impl(form), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), multipart: unwrap_impl(multipart), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
185
|
+
wrap_impl(@impl.put(unwrap_impl(url), data: unwrap_impl(data), failOnStatusCode: unwrap_impl(failOnStatusCode), form: unwrap_impl(form), headers: unwrap_impl(headers), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), maxRedirects: unwrap_impl(maxRedirects), multipart: unwrap_impl(multipart), params: unwrap_impl(params), timeout: unwrap_impl(timeout)))
|
179
186
|
end
|
180
187
|
|
181
188
|
# Returns storage state for this request context, contains current cookies and local storage snapshot if it was passed to
|
@@ -30,6 +30,12 @@ module Playwright
|
|
30
30
|
# The default browser context is accessible via [`method: Browser.contexts`].
|
31
31
|
#
|
32
32
|
# > NOTE: Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.
|
33
|
+
#
|
34
|
+
# ```python sync
|
35
|
+
# browser = playwright.chromium.connect_over_cdp("http://localhost:9222")
|
36
|
+
# default_context = browser.contexts[0]
|
37
|
+
# page = default_context.pages[0]
|
38
|
+
# ```
|
33
39
|
def connect_over_cdp(
|
34
40
|
endpointURL,
|
35
41
|
headers: nil,
|
@@ -11,7 +11,7 @@ module Playwright
|
|
11
11
|
# **Strictness**
|
12
12
|
#
|
13
13
|
# Frame locators are strict. This means that all operations on frame locators will throw if more than one element matches
|
14
|
-
# given selector.
|
14
|
+
# a given selector.
|
15
15
|
#
|
16
16
|
# ```python sync
|
17
17
|
# # Throws if there are several frames in DOM:
|
data/lib/playwright_api/page.rb
CHANGED
@@ -1321,7 +1321,7 @@ module Playwright
|
|
1321
1321
|
# `detached`.
|
1322
1322
|
#
|
1323
1323
|
# > NOTE: Playwright automatically waits for element to be ready before performing an action. Using `Locator` objects and
|
1324
|
-
# web-first assertions
|
1324
|
+
# web-first assertions makes the code wait-for-selector-free.
|
1325
1325
|
#
|
1326
1326
|
# Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If at
|
1327
1327
|
# the moment of calling the method `selector` already satisfies the condition, the method will return immediately. If the
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playwright-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -399,5 +399,5 @@ requirements: []
|
|
399
399
|
rubygems_version: 3.3.7
|
400
400
|
signing_key:
|
401
401
|
specification_version: 4
|
402
|
-
summary: The Ruby binding of playwright driver 1.
|
402
|
+
summary: The Ruby binding of playwright driver 1.26.0
|
403
403
|
test_files: []
|