playwright-ruby-client 0.0.8 → 0.0.9
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/docs/api_coverage.md +42 -45
- data/lib/playwright.rb +1 -0
- data/lib/playwright/channel_owners/browser_context.rb +9 -1
- data/lib/playwright/channel_owners/frame.rb +7 -0
- data/lib/playwright/channel_owners/page.rb +250 -0
- data/lib/playwright/channel_owners/request.rb +8 -0
- data/lib/playwright/event_emitter.rb +4 -1
- data/lib/playwright/http_headers.rb +20 -0
- data/lib/playwright/utils.rb +1 -1
- data/lib/playwright/version.rb +1 -1
- data/lib/playwright_api/android.rb +4 -4
- data/lib/playwright_api/android_device.rb +5 -5
- data/lib/playwright_api/android_input.rb +4 -4
- data/lib/playwright_api/browser.rb +5 -3
- data/lib/playwright_api/browser_context.rb +3 -29
- data/lib/playwright_api/browser_type.rb +3 -3
- data/lib/playwright_api/chromium_browser_context.rb +0 -2
- data/lib/playwright_api/dialog.rb +5 -1
- data/lib/playwright_api/element_handle.rb +89 -88
- data/lib/playwright_api/file_chooser.rb +13 -5
- data/lib/playwright_api/frame.rb +99 -100
- data/lib/playwright_api/js_handle.rb +11 -12
- data/lib/playwright_api/page.rb +140 -149
- data/lib/playwright_api/playwright.rb +10 -5
- data/lib/playwright_api/request.rb +5 -8
- data/lib/playwright_api/response.rb +0 -7
- data/lib/playwright_api/route.rb +1 -0
- data/lib/playwright_api/selectors.rb +2 -2
- data/lib/playwright_api/web_socket.rb +0 -6
- data/lib/playwright_api/worker.rb +13 -13
- metadata +3 -2
@@ -154,8 +154,8 @@ module Playwright
|
|
154
154
|
wrap_impl(@impl.firefox)
|
155
155
|
end
|
156
156
|
|
157
|
-
# Selectors can be used to install custom selector engines. See
|
158
|
-
#
|
157
|
+
# Selectors can be used to install custom selector engines. See [Working with selectors](./selectors.md) for more
|
158
|
+
# information.
|
159
159
|
def selectors # property
|
160
160
|
raise NotImplementedError.new('selectors is not implemented yet.')
|
161
161
|
end
|
@@ -165,9 +165,9 @@ module Playwright
|
|
165
165
|
wrap_impl(@impl.webkit)
|
166
166
|
end
|
167
167
|
|
168
|
-
#
|
169
|
-
def
|
170
|
-
|
168
|
+
# Terminates this instance of Playwright, will also close all created browsers if they are still running.
|
169
|
+
def close
|
170
|
+
raise NotImplementedError.new('close is not implemented yet.')
|
171
171
|
end
|
172
172
|
|
173
173
|
# @nodoc
|
@@ -175,6 +175,11 @@ module Playwright
|
|
175
175
|
wrap_impl(@impl.electron)
|
176
176
|
end
|
177
177
|
|
178
|
+
# @nodoc
|
179
|
+
def android
|
180
|
+
wrap_impl(@impl.android)
|
181
|
+
end
|
182
|
+
|
178
183
|
# -- inherited from EventEmitter --
|
179
184
|
# @nodoc
|
180
185
|
def on(event, callback)
|
@@ -62,14 +62,6 @@ module Playwright
|
|
62
62
|
wrap_impl(@impl.post_data_buffer)
|
63
63
|
end
|
64
64
|
|
65
|
-
# Returns parsed request's body for `form-urlencoded` and JSON as a fallback if any.
|
66
|
-
#
|
67
|
-
# When the response is `application/x-www-form-urlencoded` then a key/value object of the values will be returned.
|
68
|
-
# Otherwise it will be parsed as JSON.
|
69
|
-
def post_data_json
|
70
|
-
wrap_impl(@impl.post_data_json)
|
71
|
-
end
|
72
|
-
|
73
65
|
# Request that was redirected by the server to this one, if any.
|
74
66
|
#
|
75
67
|
# When the server responds with a redirect, Playwright creates a new `Request` object. The two requests are connected by
|
@@ -183,6 +175,11 @@ module Playwright
|
|
183
175
|
wrap_impl(@impl.after_initialize)
|
184
176
|
end
|
185
177
|
|
178
|
+
# @nodoc
|
179
|
+
def post_data_json
|
180
|
+
wrap_impl(@impl.post_data_json)
|
181
|
+
end
|
182
|
+
|
186
183
|
# -- inherited from EventEmitter --
|
187
184
|
# @nodoc
|
188
185
|
def on(event, callback)
|
@@ -22,13 +22,6 @@ module Playwright
|
|
22
22
|
raise NotImplementedError.new('headers is not implemented yet.')
|
23
23
|
end
|
24
24
|
|
25
|
-
# Returns the JSON representation of response body.
|
26
|
-
#
|
27
|
-
# This method will throw if the response body is not parsable via `JSON.parse`.
|
28
|
-
def json
|
29
|
-
raise NotImplementedError.new('json is not implemented yet.')
|
30
|
-
end
|
31
|
-
|
32
25
|
# Contains a boolean stating whether the response was successful (status in the range 200-299) or not.
|
33
26
|
def ok
|
34
27
|
raise NotImplementedError.new('ok is not implemented yet.')
|
data/lib/playwright_api/route.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Playwright
|
2
|
-
# Selectors can be used to install custom selector engines. See
|
3
|
-
#
|
2
|
+
# Selectors can be used to install custom selector engines. See [Working with selectors](./selectors.md) for more
|
3
|
+
# information.
|
4
4
|
class Selectors < PlaywrightApi
|
5
5
|
|
6
6
|
# An example of registering selector engine that queries elements based on a tag name:
|
@@ -11,11 +11,5 @@ module Playwright
|
|
11
11
|
def url
|
12
12
|
raise NotImplementedError.new('url is not implemented yet.')
|
13
13
|
end
|
14
|
-
|
15
|
-
# Waits for event to fire and passes its value into the predicate function. Returns when the predicate returns truthy
|
16
|
-
# value. Will throw an error if the webSocket is closed before the event is fired. Returns the event data value.
|
17
|
-
def expect_event(event, optionsOrPredicate: nil)
|
18
|
-
raise NotImplementedError.new('expect_event is not implemented yet.')
|
19
|
-
end
|
20
14
|
end
|
21
15
|
end
|
@@ -28,26 +28,26 @@ module Playwright
|
|
28
28
|
# ```
|
29
29
|
class Worker < PlaywrightApi
|
30
30
|
|
31
|
-
# Returns the return value of `
|
31
|
+
# Returns the return value of `expression`.
|
32
32
|
#
|
33
|
-
# If the function passed to the `
|
34
|
-
# to resolve and return its value.
|
33
|
+
# If the function passed to the [`method: Worker.evaluate`] returns a [Promise], then [`method: Worker.evaluate`] would
|
34
|
+
# wait for the promise to resolve and return its value.
|
35
35
|
#
|
36
|
-
# If the function passed to the `
|
37
|
-
# `undefined`.
|
38
|
-
# `-0`, `NaN`, `Infinity`, `-Infinity
|
39
|
-
def evaluate(
|
36
|
+
# If the function passed to the [`method: Worker.evaluate`] returns a non-[Serializable] value, then
|
37
|
+
# [`method: Worker.evaluate`] returns `undefined`. Playwright also supports transferring some additional values that are
|
38
|
+
# not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`.
|
39
|
+
def evaluate(expression, arg: nil)
|
40
40
|
raise NotImplementedError.new('evaluate is not implemented yet.')
|
41
41
|
end
|
42
42
|
|
43
|
-
# Returns the return value of `
|
43
|
+
# Returns the return value of `expression` as a `JSHandle`.
|
44
44
|
#
|
45
|
-
# The only difference between `
|
46
|
-
#
|
45
|
+
# The only difference between [`method: Worker.evaluate`] and [`method: Worker.evaluateHandle`] is that
|
46
|
+
# [`method: Worker.evaluateHandle`] returns `JSHandle`.
|
47
47
|
#
|
48
|
-
# If the function passed to the `
|
49
|
-
# the promise to resolve and return its value.
|
50
|
-
def evaluate_handle(
|
48
|
+
# If the function passed to the [`method: Worker.evaluateHandle`] returns a [Promise], then
|
49
|
+
# [`method: Worker.evaluateHandle`] would wait for the promise to resolve and return its value.
|
50
|
+
def evaluate_handle(expression, arg: nil)
|
51
51
|
raise NotImplementedError.new('evaluate_handle is not implemented yet.')
|
52
52
|
end
|
53
53
|
|
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: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -207,6 +207,7 @@ files:
|
|
207
207
|
- lib/playwright/errors.rb
|
208
208
|
- lib/playwright/event_emitter.rb
|
209
209
|
- lib/playwright/events.rb
|
210
|
+
- lib/playwright/http_headers.rb
|
210
211
|
- lib/playwright/input_files.rb
|
211
212
|
- lib/playwright/input_type.rb
|
212
213
|
- lib/playwright/input_types/android_input.rb
|