playwright-ruby-client 1.20.1 → 1.20.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0ac92a21e56cb8136a67c37b4f0a7f5edd5668124c8f54a7d676fd384568fd6
4
- data.tar.gz: 8d1f15d0f9c3dfc190d0cc0976814ab6bf90a927af722d4164861e57c93564a2
3
+ metadata.gz: bf7d8c81cfea6013b4c2f002b93f5b705b75db9cf5ce633ed99beda7d41263f6
4
+ data.tar.gz: f8a705969e6aa35661b4de50ce15e94b763ddd8b7b1c454e9a323a421fa3748b
5
5
  SHA512:
6
- metadata.gz: 746dcb1563f9777c374572d2b7ecfbde7833a3ce1b546933958ae920a417d1e474e27c8b569b3fc25cc117735e07bdb420dec838baadebe6375ab83d13c959bd
7
- data.tar.gz: a9dca767fdfec65ba0ef854677e600ef00fabfbdd60ad534fb5182e292c603eb4cbb1b1eb77440f85415d5189bce902d3899389033c591f6e1d1d925de67afc4
6
+ metadata.gz: 8971e9467e336ea9915bc1b4ec6f1b1598e6a0a797271de5897deda8073fdc16d13d346146563c1e549de4c064a8100c853248b97de2072851727465ed6e432d
7
+ data.tar.gz: 4245aeee24a0004ca5d8259e01b5026bab8c32f2567c6eb2e7dfa6524d01359d3cd34d495f3bd83f95443d0776c0ea4e5cd326d857de2b886cfd6eb83084ec3f
@@ -5,7 +5,8 @@ module Playwright
5
5
  end
6
6
 
7
7
  def devices(port: nil)
8
- resp = @channel.send_message_to_server('devices', port: port)
8
+ params = { port: port }.compact
9
+ resp = @channel.send_message_to_server('devices', params)
9
10
  resp.map { |device| ChannelOwners::AndroidDevice.from(device) }
10
11
  end
11
12
  end
@@ -65,10 +65,6 @@ module Playwright
65
65
  @channel.send_message_to_server('info', selector: to_selector_channel(selector))
66
66
  end
67
67
 
68
- def tree
69
- @channel.send_message_to_server('tree')
70
- end
71
-
72
68
  def screenshot(path: nil)
73
69
  encoded_binary = @channel.send_message_to_server('screenshot')
74
70
  decoded_binary = Base64.strict_decode64(encoded_binary)
@@ -180,7 +180,7 @@ module Playwright
180
180
  else
181
181
  [urls]
182
182
  end
183
- @channel.send_message_to_server('cookies', urls: urls)
183
+ @channel.send_message_to_server('cookies', urls: target_urls)
184
184
  end
185
185
 
186
186
  def add_cookies(cookies)
@@ -226,7 +226,7 @@ module Playwright
226
226
  raise ArgumentError.new('Either path or script parameter must be specified')
227
227
  end
228
228
 
229
- @channel.send_message_to_server('addInitScript', source: script)
229
+ @channel.send_message_to_server('addInitScript', source: source)
230
230
  nil
231
231
  end
232
232
 
@@ -386,7 +386,7 @@ module Playwright
386
386
  raise ArgumentError.new('Either path or script parameter must be specified')
387
387
  end
388
388
 
389
- @channel.send_message_to_server('addInitScript', source: script)
389
+ @channel.send_message_to_server('addInitScript', source: source)
390
390
  nil
391
391
  end
392
392
 
@@ -24,21 +24,19 @@ module Playwright
24
24
  end
25
25
 
26
26
  if hash.key?('v')
27
- return
28
- case hash['v']
29
- when 'undefined'
30
- nil
31
- when 'null'
32
- nil
33
- when 'NaN'
34
- Float::NAN
35
- when 'Infinity'
36
- Float::INFINITY
37
- when '-Infinity'
38
- -Float::INFINITY
39
- when '-0'
40
- -0
41
- end
27
+ return case hash['v']
28
+ when 'undefined'
29
+ nil
30
+ when 'null'
31
+ nil
32
+ when 'NaN'
33
+ Float::NAN
34
+ when 'Infinity'
35
+ Float::INFINITY
36
+ when '-Infinity'
37
+ -Float::INFINITY when '-0'
38
+ -0
39
+ end
42
40
  end
43
41
 
44
42
  if hash.key?('d')
@@ -46,7 +46,6 @@ module Playwright
46
46
  #
47
47
  # @note This method blocks until playwright-cli exited. Consider using Thread or Future.
48
48
  def async_run
49
- popen3_args = {}
50
49
  @stdin, @stdout, @stderr, @thread = run_driver_with_open3
51
50
  @stdin.binmode # Ensure Strings are written 1:1 without encoding conversion, necessary for integer values
52
51
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playwright
4
- VERSION = '1.20.1'
5
- COMPATIBLE_PLAYWRIGHT_VERSION = '1.20.1'
4
+ VERSION = '1.20.2'
5
+ COMPATIBLE_PLAYWRIGHT_VERSION = '1.20.2'
6
6
  end
@@ -169,11 +169,6 @@ module Playwright
169
169
  wrap_impl(@impl.tap_on(unwrap_impl(selector), duration: unwrap_impl(duration), timeout: unwrap_impl(timeout)))
170
170
  end
171
171
 
172
- # @nodoc
173
- def tree
174
- wrap_impl(@impl.tree)
175
- end
176
-
177
172
  # -- inherited from EventEmitter --
178
173
  # @nodoc
179
174
  def off(event, callback)
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.20.1
4
+ version: 1.20.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-26 00:00:00.000000000 Z
11
+ date: 2022-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -396,5 +396,5 @@ requirements: []
396
396
  rubygems_version: 3.3.7
397
397
  signing_key:
398
398
  specification_version: 4
399
- summary: The Ruby binding of playwright driver 1.20.1
399
+ summary: The Ruby binding of playwright driver 1.20.2
400
400
  test_files: []