true_automation 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0bf53dc1f2d8755f2b13e7c63a2b62172225fcc26c8fddfc461963a77ecc595
4
- data.tar.gz: 1ca188644cd2411f68f4153b7352fc31a9bf821c5d6613718d6202ef939f641d
3
+ metadata.gz: 1cc9e6c269815476bedfdab280e9bdb3f6b501c35bde134ebd1c1701cf894b5c
4
+ data.tar.gz: 50fa9493181c181937e7c49fc1c0786b62c62964832257b836e6844b20ee7f6a
5
5
  SHA512:
6
- metadata.gz: 7945c55acaa37f7bf931aed7760648d0abc941ed4b8607ff7166a92290c1a7556eebff9b3627e2bad3d926d0df4fec06a9e9ba969b686052d19567b40ac10baa
7
- data.tar.gz: baba5d0a9b3d6ee227cc3c7d89ca759db46d5f9b25c8c57ff0f57ebf870e45cf55ad45df2800b977f0fd49f8f5e53f8b77c98c4bf44c6a32db868874c170b8f4
6
+ metadata.gz: c383abe0231435fdec8372e98cc45b5c8c5b96ec54e673fea2970dfcbc0fec8cc5290d0ed16ade739e8939c12277ce3179b0cb44f2560dd282aecef27c020ad4
7
+ data.tar.gz: 2d7b326dc4f5d2522d65c4d819d12862e5322a4b3a2f89dd1b7217bd7c5c9e66e94f582e2c6f547128e7998c1782a8d315e7f50b66376f6e680a8b91919a78af
@@ -93,13 +93,11 @@ module TrueAutomation
93
93
  options ||= {}
94
94
  ta_url = options[:ta_url] || "http://localhost:#{@port}/"
95
95
 
96
- capabilities = options[:capabilities] || {}
96
+ capabilities = options[:capabilities] || Selenium::WebDriver::Options.chrome
97
97
 
98
98
  if options && options[:browser] == :remote
99
99
  raise 'Remote driver URL is not specified' unless options[:url]
100
- input_caps = opts_to_json(options[:capabilities]) || {}
101
- browser = opts_browser(options[:capabilities] || Selenium::WebDriver::Options.chrome)
102
- capabilities = options_class(browser).new(**input_caps)
100
+ capabilities = duplicate_options(capabilities)
103
101
  capabilities.add_preference(:taRemoteUrl, options[:url])
104
102
  @remote = ' --remote'
105
103
  end
@@ -169,17 +167,24 @@ module TrueAutomation
169
167
  opts&.as_json
170
168
  end
171
169
 
172
- def fetch_options(options)
173
- if options.delete(:ta_recorder)
174
- @ta_recorder = ' --ta-recorder'
170
+ def duplicate_options(original_options)
171
+ browser = opts_browser(original_options || Selenium::WebDriver::Options.chrome)
172
+ opts = opts_to_json(original_options) || {}
173
+ capabilities = options_class(browser).new(**opts)
174
+ original_options.extensions.each do |ext|
175
+ capabilities.add_extension(ext)
175
176
  end
177
+ capabilities
178
+ end
179
+
180
+ def fetch_options(options)
176
181
  if options.key?(:options)
177
- browser = opts_browser(options[:options])
178
- opts = opts_to_json(options[:options])
179
- desCaps = options_class(browser).new(**opts)
180
- options[:capabilities] = desCaps
182
+ options[:capabilities] = duplicate_options(options[:options])
181
183
  options.delete(:options)
182
184
  end
185
+ if options.delete(:ta_recorder)
186
+ @ta_recorder = ' --ta-recorder'
187
+ end
183
188
  options
184
189
  end
185
190
 
@@ -1,3 +1,3 @@
1
1
  module TrueAutomation
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: true_automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrueAutomation.IO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-13 00:00:00.000000000 Z
11
+ date: 2023-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler