capybara-playwright-driver 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capybara/playwright/browser.rb +18 -1
- data/lib/capybara/playwright/driver.rb +1 -1
- data/lib/capybara/playwright/version.rb +1 -1
- 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: 0f88314708baa0e7547488ccf9ad93c70f4ab5b4bb9408c5452d013091688034
|
4
|
+
data.tar.gz: 578733ad152ef6065cb9c351e48d43ccabd5a0a9dca644c4ad791b2e7e4e5c5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f77aa0e32476d52e6c3aa875a52b24c2693e7129b22a72ca416f30749b167f14b8846889ce39d2db203ce25e890ff74eac1d13f42f630131e64aaab63a578764
|
7
|
+
data.tar.gz: 9c22919f25f1a0012a98dc1186724553fbdbecc0df10f95b5f80592e8489a3ed20218b19d8dcf3d2df0e467b8ed457606e039d288d28236c42e72c640a121b89
|
@@ -328,7 +328,24 @@ module Capybara
|
|
328
328
|
when ::Playwright::ElementHandle
|
329
329
|
Node.new(@driver, @playwright_page, arg)
|
330
330
|
when ::Playwright::JSHandle
|
331
|
-
arg.
|
331
|
+
obj_type, is_array = arg.evaluate('obj => [typeof obj, Array.isArray(obj)]')
|
332
|
+
if obj_type == 'object'
|
333
|
+
if is_array
|
334
|
+
# Firefox often include 'toJSON' into properties.
|
335
|
+
# https://github.com/microsoft/playwright/issues/7015
|
336
|
+
#
|
337
|
+
# Get rid of non-numeric entries.
|
338
|
+
arg.properties.select { |key, _| key.to_i.to_s == key.to_s }.map do |_, value|
|
339
|
+
wrap_node(value)
|
340
|
+
end
|
341
|
+
else
|
342
|
+
arg.properties.map do |key, value|
|
343
|
+
[key, wrap_node(value)]
|
344
|
+
end.to_h
|
345
|
+
end
|
346
|
+
else
|
347
|
+
arg.json_value
|
348
|
+
end
|
332
349
|
else
|
333
350
|
arg
|
334
351
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-playwright-driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|