ferrum 0.10 → 0.10.1

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: c605388d1ea1a0f54f5f1ef24e56a93b60d109ec6eb02798d9de606cd54c29ef
4
- data.tar.gz: a0cb3328ad526e51beaefb5eb8140659b1dd277acda5305f46464200d02ed24a
3
+ metadata.gz: 1cea2150084c494e0461e9a63b53ff215e34ed98f2bfe345458ae46c95f0f8f3
4
+ data.tar.gz: 46fad57af780b5a5b6ff9659125642d6b57674db386af34b868dc07d1164e2b6
5
5
  SHA512:
6
- metadata.gz: c3e44b234a458079b268b7af941af8404a7aa9e6ade2d018ca07fdabcc21518a5d1ad6daafbcdcd3ed7dffe5f94f9b5a4fef36aa1b317178b1604df7f96a8a2b
7
- data.tar.gz: 8b4ea9e0c5b0d029d743b1314dba4b6111f87f26ac4cb5c87e1b06d04b9693fc0570908456c4ced0860b07cc748d8ba783b320481d2879ec5df7b65ec70e85ec
6
+ metadata.gz: 63d6104319d89bfa85897c946c01f6d44efd92de88204b4882ccea879e196dd80bebfd61b06a7566272dd6e22de1c306eb1385d17a6a72df739d94753adb0a41
7
+ data.tar.gz: ef333fd514ea94d674bf4ad51117f736c4d7982ca56981192fe636010e1f34df6c84d889ce2ce40bfeeb47534f1c912a5aec54efdad01e23b7d915ac1be88524
@@ -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
- options.merge!(objectId: object_id)
129
- else
130
- options.merge!(executionContextId: execution_id)
130
+ params = params.merge(objectId: object_id)
131
131
  end
132
132
 
133
- options.merge!(functionDeclaration: expression,
134
- arguments: prepare_args(arguments))
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
- **options)
139
+ **params.merge(functionDeclaration: expression,
140
+ arguments: prepare_args(arguments)))
139
141
  handle_error(response)
140
142
  response = response["result"]
141
143
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ferrum
4
- VERSION = "0.10"
4
+ VERSION = "0.10.1"
5
5
  end
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: '0.10'
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-23 00:00:00.000000000 Z
11
+ date: 2021-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: websocket-driver