ferrum 0.10 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ferrum/frame/runtime.rb +8 -6
- data/lib/ferrum/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: 1cea2150084c494e0461e9a63b53ff215e34ed98f2bfe345458ae46c95f0f8f3
|
4
|
+
data.tar.gz: 46fad57af780b5a5b6ff9659125642d6b57674db386af34b868dc07d1164e2b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63d6104319d89bfa85897c946c01f6d44efd92de88204b4882ccea879e196dd80bebfd61b06a7566272dd6e22de1c306eb1385d17a6a72df739d94753adb0a41
|
7
|
+
data.tar.gz: ef333fd514ea94d674bf4ad51117f736c4d7982ca56981192fe636010e1f34df6c84d889ce2ce40bfeeb47534f1c912a5aec54efdad01e23b7d915ac1be88524
|
data/lib/ferrum/frame/runtime.rb
CHANGED
@@ -122,20 +122,22 @@ module Ferrum
|
|
122
122
|
attempts, sleep = INTERMITTENT_ATTEMPTS, INTERMITTENT_SLEEP
|
123
123
|
|
124
124
|
Ferrum.with_attempts(errors: errors, max: attempts, wait: sleep) do
|
125
|
+
params = options.dup
|
126
|
+
|
125
127
|
if on
|
126
128
|
response = @page.command("DOM.resolveNode", nodeId: on.node_id)
|
127
129
|
object_id = response.dig("object", "objectId")
|
128
|
-
|
129
|
-
else
|
130
|
-
options.merge!(executionContextId: execution_id)
|
130
|
+
params = params.merge(objectId: object_id)
|
131
131
|
end
|
132
132
|
|
133
|
-
|
134
|
-
|
133
|
+
if params[:executionContextId].nil? && params[:objectId].nil?
|
134
|
+
params = params.merge(executionContextId: execution_id)
|
135
|
+
end
|
135
136
|
|
136
137
|
response = @page.command("Runtime.callFunctionOn",
|
137
138
|
wait: wait, slowmoable: true,
|
138
|
-
**
|
139
|
+
**params.merge(functionDeclaration: expression,
|
140
|
+
arguments: prepare_args(arguments)))
|
139
141
|
handle_error(response)
|
140
142
|
response = response["result"]
|
141
143
|
|
data/lib/ferrum/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ferrum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Vorotilin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket-driver
|