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.
@@ -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
- # [Working with selectors](./selectors.md#working-with-selectors) for more information.
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
- # @nodoc
169
- def android
170
- wrap_impl(@impl.android)
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.')
@@ -97,6 +97,7 @@ module Playwright
97
97
  # ```
98
98
  def fulfill(
99
99
  body: nil,
100
+ bodyBytes: nil,
100
101
  contentType: nil,
101
102
  headers: nil,
102
103
  path: nil,
@@ -1,6 +1,6 @@
1
1
  module Playwright
2
- # Selectors can be used to install custom selector engines. See
3
- # [Working with selectors](./selectors.md#working-with-selectors) for more information.
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 `pageFunction`
31
+ # Returns the return value of `expression`.
32
32
  #
33
- # If the function passed to the `worker.evaluate` returns a [Promise], then `worker.evaluate` would wait for the promise
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 `worker.evaluate` returns a non-[Serializable] value, then `worker.evaluate` returns
37
- # `undefined`. DevTools Protocol also supports transferring some additional values that are not serializable by `JSON`:
38
- # `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals.
39
- def evaluate(pageFunction, arg: nil)
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 `pageFunction` as in-page object (JSHandle).
43
+ # Returns the return value of `expression` as a `JSHandle`.
44
44
  #
45
- # The only difference between `worker.evaluate` and `worker.evaluateHandle` is that `worker.evaluateHandle` returns
46
- # in-page object (JSHandle).
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 `worker.evaluateHandle` returns a [Promise], then `worker.evaluateHandle` would wait for
49
- # the promise to resolve and return its value.
50
- def evaluate_handle(pageFunction, arg: nil)
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.8
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 00:00:00.000000000 Z
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