scoutui 2.0.3.57.pre → 2.0.4.0
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 +4 -4
- data/.gitignore +4 -2
- data/README.md +0 -7
- data/lib/scoutui/base/q_browser.rb +13 -4
- data/lib/scoutui/base/q_har_mgr.rb +63 -0
- data/lib/scoutui/base/visual_test_framework.rb +8 -3
- data/lib/scoutui/commands/clauses/do_until.rb +0 -4
- data/lib/scoutui/commands/click_object.rb +1 -0
- data/lib/scoutui/commands/strategy.rb +55 -0
- data/lib/scoutui/utils/utils.rb +14 -3
- data/lib/scoutui/version.rb +1 -1
- data/scoutui.gemspec +2 -3
- metadata +11 -57
- data/bin/scoutui_driver +0 -1
- data/examples/benchmark/ex.rb +0 -16
- data/examples/capabilities/win10.chrome46.json +0 -6
- data/examples/carmax/appmodel/search_results.json +0 -27
- data/examples/carmax/commands/commands.yml +0 -63
- data/examples/cmdshell/commands/hello.yml +0 -22
- data/examples/converters/jsonupdate.rb +0 -31
- data/examples/ex2/appmodel/common.json +0 -51
- data/examples/ex2/appmodel/page_model.json +0 -106
- data/examples/ex2/appmodel/register.model.json +0 -42
- data/examples/ex2/commands/commands.basic.appmodel.yml +0 -8
- data/examples/ex2/commands/commands.yml +0 -115
- data/examples/ex2/commands/ex1.yml +0 -7
- data/examples/ex2/commands/ex1c.yml +0 -8
- data/examples/ex2/commands/ex1d.yml +0 -22
- data/examples/ex2/commands/ex2.hover.yml +0 -43
- data/examples/ex2/commands/ex2.yml +0 -24
- data/examples/ex2/data.json +0 -6
- data/examples/ex2/test-configs/test.config.basic.json +0 -12
- data/examples/ex2/test-configs/test.config.json +0 -31
- data/examples/ex2/tests/run-test.sh +0 -125
- data/examples/ex2/tests/test-basic-appmodel.sh +0 -14
- data/examples/ex2/tests/test-example.sh +0 -39
- data/examples/ex2/tests/test-example1a.sh +0 -16
- data/examples/ex2/tests/test-example1b.sh +0 -13
- data/examples/ex2/tests/test-example1c.sh +0 -15
- data/examples/ex2/tests/test-example1d.sh +0 -15
- data/examples/ex2/tests/test-example2.forms.eyes.sh +0 -40
- data/examples/ex2/tests/test-example2.hover.eyes.sh +0 -40
- data/examples/ex2/tests/test-example2.hover.sh +0 -26
- data/examples/ex2/tests/test-example2.sh +0 -43
- data/examples/ex2/tests/test-example3.sauce.sh +0 -77
- data/examples/ex2/tests/test-example3.sh +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34ed84007ef4998e7b2cc820d506924afd43cda3
|
4
|
+
data.tar.gz: b2158277a8b948fff0289325448946a5cf7c1fbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c48105b8807085f336963b8975e43ab4d93f94b1c291ecdb4569fc6c6a1ac7d3a1355abd4752023c65ea0b3e9acae0cc9bfb8df66bb8d2e54f8581e9cd9ed5a2
|
7
|
+
data.tar.gz: ce395f4c6c40dbc38ebd317f1d97f471f90ea3c05bafc992d57264f5e05324b36f71d616178885771e8556f1b7be99d4e2bbce16fd2a30370648796fcd39df49
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -92,6 +92,10 @@ module Scoutui::Base
|
|
92
92
|
|
93
93
|
rescue Selenium::WebDriver::Error::NoSuchAlertError
|
94
94
|
;
|
95
|
+
|
96
|
+
rescue Selenium::WebDriver::Error::WebDriverError
|
97
|
+
# Support for phantomjs/ghostdriver per switch_to.alert()
|
98
|
+
;
|
95
99
|
end
|
96
100
|
|
97
101
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " existsAlert?() => #{rc}"
|
@@ -364,16 +368,21 @@ module Scoutui::Base
|
|
364
368
|
|
365
369
|
def self.getElement(drv, _locator, _frames, _timeout=nil)
|
366
370
|
|
367
|
-
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " getElement(#{_locator})"
|
371
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "== getElement(#{_locator}) =="
|
368
372
|
_isntStale=true
|
369
373
|
obj = Scoutui::Base::QBrowser.findElement(drv,
|
370
374
|
_locator,
|
371
375
|
_frames,
|
372
376
|
_timeout)
|
373
377
|
|
374
|
-
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " | locator: #{_locator}"
|
375
|
-
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " | obj
|
376
|
-
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " | stale
|
378
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " | locator : #{_locator}"
|
379
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " | obj : #{obj}"
|
380
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " | stale : " + Scoutui::Base::QBrowser.isStale?(obj).to_s
|
381
|
+
if obj.is_a?(Selenium::WebDriver::Element)
|
382
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " | displayed : " + obj.displayed?.to_s
|
383
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " | enabled : " + obj.enabled?.to_s
|
384
|
+
end
|
385
|
+
|
377
386
|
|
378
387
|
cnt=0
|
379
388
|
if obj.is_a?(Selenium::WebDriver::Element) && Scoutui::Base::QBrowser.isStale?(obj) && !_locator.nil?
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
#require 'browsermob/proxy'
|
3
|
+
|
4
|
+
|
5
|
+
module Scoutui::Base
|
6
|
+
|
7
|
+
class QHarMgr
|
8
|
+
include Singleton
|
9
|
+
|
10
|
+
attr_accessor :proxy_binary
|
11
|
+
attr_accessor :proxy
|
12
|
+
attr_accessor :seleniumProfile
|
13
|
+
|
14
|
+
|
15
|
+
def initialize()
|
16
|
+
puts __FILE__ + (__LINE__).to_s + " -- start BrowserMob --" if Scoutui::Utils::TestUtils.instance.isDebug?
|
17
|
+
@proxy_binary = BrowserMob::Proxy::Server.new(ENV['BROWSER_MOB_BIN'], { :port => 8088 })
|
18
|
+
end
|
19
|
+
|
20
|
+
def start()
|
21
|
+
puts __FILE__ + (__LINE__).to_s + " --start --"
|
22
|
+
@proxy_binary.start
|
23
|
+
@proxy = @proxy_binary.create_proxy
|
24
|
+
@seleniumProfile = @proxy.selenium_proxy # Needed by Selenium instance
|
25
|
+
|
26
|
+
@proxy.new_har(:capture_headers => true)
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
def getSeleniumProfile()
|
31
|
+
puts __FILE__ + (__LINE__).to_s + " == getSeleniumProfile() => #{@seleniumProfile} --"
|
32
|
+
@seleniumProfile
|
33
|
+
end
|
34
|
+
|
35
|
+
def stop(save_as=nil)
|
36
|
+
puts __FILE__ + (__LINE__).to_s + " -- stop(#{save_as.to_s} --"
|
37
|
+
# @proxy.close
|
38
|
+
|
39
|
+
if !save_as.nil?
|
40
|
+
@proxy.har.save_to(save_as)
|
41
|
+
end
|
42
|
+
|
43
|
+
@proxy.close
|
44
|
+
end
|
45
|
+
|
46
|
+
def capture_traffic
|
47
|
+
# @proxy.new_har
|
48
|
+
yield
|
49
|
+
@proxy.har
|
50
|
+
end
|
51
|
+
|
52
|
+
def run(n)
|
53
|
+
puts __FILE__ + (__LINE__).to_s + " -- run --"
|
54
|
+
@har = capture_traffic { yield }
|
55
|
+
# @proxy.close
|
56
|
+
# @har.save_to(n)
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
|
63
|
+
end
|
@@ -987,8 +987,6 @@ module Scoutui::Base
|
|
987
987
|
|
988
988
|
Scoutui::Commands::Utils.instance.reset(e)
|
989
989
|
|
990
|
-
puts __FILE__ + (__LINE__).to_s + " page => #{e}"
|
991
|
-
|
992
990
|
if e[STEP_KEY].has_key?("timeout")
|
993
991
|
Scoutui::Commands::Utils.instance.setTimeout(e[STEP_KEY]["timeout"])
|
994
992
|
end
|
@@ -1412,7 +1410,14 @@ module Scoutui::Base
|
|
1412
1410
|
if Scoutui::Utils::TestUtils.instance.screenShots?
|
1413
1411
|
_saveScreenAs=Scoutui::Utils::TestUtils.instance.sanitize_filename(_name)
|
1414
1412
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " ScreenSave : #{_saveScreenAs}"
|
1415
|
-
|
1413
|
+
|
1414
|
+
|
1415
|
+
if !File.directory?(Scoutui::Utils::TestUtils.instance.screenShotsDir)
|
1416
|
+
FileUtils::mkdir_p Scoutui::Utils::TestUtils.instance.screenShotsDir
|
1417
|
+
end
|
1418
|
+
|
1419
|
+
_fullPath=Scoutui::Utils::TestUtils.instance.screenShotsDir + '/' + _saveScreenAs + '.png'
|
1420
|
+
my_driver.save_screenshot(_fullPath)
|
1416
1421
|
end
|
1417
1422
|
|
1418
1423
|
if isSnapIt(e)
|
@@ -94,10 +94,6 @@ module Scoutui::Commands
|
|
94
94
|
if untilList.is_a?(Array) && untilList.size==1 && untilList[0]==true
|
95
95
|
_expected=false
|
96
96
|
_alwaystrue=true
|
97
|
-
elsif untilList.is_a?(Array) && untilList.size==1 && untilList[0]==false
|
98
|
-
_loop=false
|
99
|
-
_bUntil=true
|
100
|
-
_alwaystrue=true
|
101
97
|
else
|
102
98
|
_expected=Scoutui::Base::VisualTestFramework::processAsserts(@drv, untilList, false)
|
103
99
|
end
|
@@ -94,6 +94,7 @@ module Scoutui::Commands
|
|
94
94
|
|
95
95
|
@profile=nil
|
96
96
|
browserType = Scoutui::Base::UserVars.instance.getBrowserType()
|
97
|
+
caps = Scoutui::Utils::TestUtils.instance.getCapabilities()
|
97
98
|
|
98
99
|
if false
|
99
100
|
if !browserType.to_s.match(/chrome/i).nil?
|
@@ -238,6 +239,60 @@ module Scoutui::Commands
|
|
238
239
|
# https://wiki.saucelabs.com/display/DOCS/Setting+Up+Reporting+between+Sauce+Labs+and+Jenkins
|
239
240
|
puts "SauceOnDemandSessionID=#{@drv.session_id} job-name=#{caps[:name]}"
|
240
241
|
|
242
|
+
elsif !caps.nil?
|
243
|
+
|
244
|
+
_YosemiteChromeBeta='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36'
|
245
|
+
_cap=Selenium::WebDriver::Remote::Capabilities.phantomjs('phantomjs.page.settings.userAgent' => _YosemiteChromeBeta)
|
246
|
+
|
247
|
+
if caps.has_key?(:browser) && caps[:browser].match(/(phantom|phantomjs|ghost|ghostdriver)/i)
|
248
|
+
selenium_server=Scoutui::Utils::TestUtils.instance.getSeleniumServer()
|
249
|
+
selenium_server='http://localhost:8001' if selenium_server.nil?
|
250
|
+
|
251
|
+
if caps.has_key?(:useragent)
|
252
|
+
_cap=Selenium::WebDriver::Remote::Capabilities.phantomjs('phantomjs.page.settings.userAgent' => caps[:useragent])
|
253
|
+
end
|
254
|
+
|
255
|
+
@drv=Selenium::WebDriver.for :remote, :url => selenium_server, :desired_capabilities => _cap
|
256
|
+
|
257
|
+
_viewport = Scoutui::Utils::TestUtils.instance.getViewPort()
|
258
|
+
if !_viewport.nil?
|
259
|
+
target_size = Selenium::WebDriver::Dimension.new(_viewport[:width], _viewport[:height])
|
260
|
+
@drv.manage.window.size = target_size
|
261
|
+
end
|
262
|
+
|
263
|
+
end
|
264
|
+
|
265
|
+
|
266
|
+
elsif browserType.match(/(phantom|phantomjs|ghost|ghostdriver)/i)
|
267
|
+
|
268
|
+
selenium_server=Scoutui::Utils::TestUtils.instance.getSeleniumServer()
|
269
|
+
selenium_server='http://localhost:8001' if selenium_server.nil?
|
270
|
+
|
271
|
+
##
|
272
|
+
# caps
|
273
|
+
##
|
274
|
+
_useragentChromeOnMac='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36'
|
275
|
+
_useragentWin81IE11='Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko'
|
276
|
+
|
277
|
+
_Win7IE10 = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)'
|
278
|
+
|
279
|
+
_Win10Edge13='#Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586'
|
280
|
+
|
281
|
+
_Win10ChromeBeta='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.21 Safari/537.36'
|
282
|
+
_YosemiteChromeBeta='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36'
|
283
|
+
|
284
|
+
_useragent = _YosemiteChromeBeta
|
285
|
+
|
286
|
+
caps=Selenium::WebDriver::Remote::Capabilities.phantomjs('phantomjs.page.settings.userAgent' => _useragent)
|
287
|
+
# @drv=Selenium::WebDriver.for :phantomjs, :url => selenium_server, :desired_capabilities => caps
|
288
|
+
@drv=Selenium::WebDriver.for :remote, :url => selenium_server, :desired_capabilities => caps
|
289
|
+
|
290
|
+
_viewport = Scoutui::Utils::TestUtils.instance.getViewPort()
|
291
|
+
if !_viewport.nil?
|
292
|
+
target_size = Selenium::WebDriver::Dimension.new(_viewport[:width], _viewport[:height])
|
293
|
+
@drv.manage.window.size = target_size
|
294
|
+
end
|
295
|
+
|
241
296
|
else
|
242
297
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Create WebDriver: #{browserType.to_s}"
|
243
298
|
@drv=Selenium::WebDriver.for browserType.to_sym, :profile => @profile
|
data/lib/scoutui/utils/utils.rb
CHANGED
@@ -34,7 +34,7 @@ module Scoutui::Utils
|
|
34
34
|
@currentTest={:reqid => 'UI', :testcase => '00' }
|
35
35
|
|
36
36
|
[:accounts, :browser, :capabilities, :diffs_dir, :dut,:test_file, :host, :loc, :title, :viewport,
|
37
|
-
:userid, :password, :role, :json_config_file, :page_model, :report, :test_config,
|
37
|
+
:userid, :password, :role, :json_config_file, :page_model, :report, :selenium_server, :test_config,
|
38
38
|
:debug].each do |o|
|
39
39
|
@options[o]=nil
|
40
40
|
end
|
@@ -54,6 +54,7 @@ module Scoutui::Utils
|
|
54
54
|
@options[:debug]=false
|
55
55
|
@options[:fail_fast]=false
|
56
56
|
@options[:screenshots]=false
|
57
|
+
@options[:screenshots_dir]=nil
|
57
58
|
@options[:retries]=1
|
58
59
|
|
59
60
|
|
@@ -283,8 +284,8 @@ module Scoutui::Utils
|
|
283
284
|
|
284
285
|
|
285
286
|
opt.on('--screenshots Bool', [:true, :false]) { |o| @options[:screenshots] = !o.match(/true/i).nil? }
|
286
|
-
|
287
|
-
|
287
|
+
opt.on('--screenshots:run Bool', [:true, :false]) { |o| @options[:screenshots] = !o.match(/true/i).nil? }
|
288
|
+
opt.on('--screenshots:dir DIR') { |o| @options[:screenshots_dir] = o.to_s }
|
288
289
|
|
289
290
|
opt.on('--role ROLE') { |o|
|
290
291
|
@options[:role]=o
|
@@ -306,6 +307,8 @@ module Scoutui::Utils
|
|
306
307
|
opt.on('--sauce:resolution Resolution') { |o| @options[:sauce_resolution] = o }
|
307
308
|
opt.on('--sauce:version Version') { |o| @options[:sauce_version] = o }
|
308
309
|
|
310
|
+
opt.on('--seleniumserver URL') { |o| @options[:selenium_server] = o }
|
311
|
+
|
309
312
|
opt.on('--viewport [resolution]') { |o|
|
310
313
|
@options[:viewport] = o
|
311
314
|
Scoutui::Base::UserVars.instance.set('eyes.viewport', @options[:viewport])
|
@@ -398,6 +401,10 @@ module Scoutui::Utils
|
|
398
401
|
@options[:screenshots]
|
399
402
|
end
|
400
403
|
|
404
|
+
def screenShotsDir
|
405
|
+
@options[:screenshots_dir]
|
406
|
+
end
|
407
|
+
|
401
408
|
def getHost()
|
402
409
|
@options[:host].to_s
|
403
410
|
end
|
@@ -475,6 +482,10 @@ module Scoutui::Utils
|
|
475
482
|
@options[:sauce_build] || nil
|
476
483
|
end
|
477
484
|
|
485
|
+
def getSeleniumServer()
|
486
|
+
@options[:selenium_server]
|
487
|
+
end
|
488
|
+
|
478
489
|
def getBrowser()
|
479
490
|
getBrowserType()
|
480
491
|
end
|
data/lib/scoutui/version.rb
CHANGED
data/scoutui.gemspec
CHANGED
@@ -32,9 +32,8 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_development_dependency "json", ">= 1.8.3"
|
33
33
|
spec.add_development_dependency "faker"
|
34
34
|
spec.add_development_dependency "logging"
|
35
|
-
spec.add_development_dependency "sauce_whisk"
|
35
|
+
spec.add_development_dependency "sauce_whisk", "0.0.21"
|
36
36
|
spec.add_development_dependency "testmgr", ">= 0.3.2.pre"
|
37
|
-
spec.add_development_dependency "
|
38
|
-
spec.add_development_dependency "DataMgr", ">= 0.1.1.1.pre"
|
37
|
+
spec.add_development_dependency "DataMgr", ">=0.2.0"
|
39
38
|
spec.add_development_dependency "CmdShellMgr", ">= 0.1.1.2.pre"
|
40
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scoutui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Kim
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -154,16 +154,16 @@ dependencies:
|
|
154
154
|
name: sauce_whisk
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - '='
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 0.0.21
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - '='
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 0.0.21
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: testmgr
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,34 +178,20 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 0.3.2.pre
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: tiny_tds
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - ">="
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
188
|
-
type: :development
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - ">="
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: '0'
|
195
181
|
- !ruby/object:Gem::Dependency
|
196
182
|
name: DataMgr
|
197
183
|
requirement: !ruby/object:Gem::Requirement
|
198
184
|
requirements:
|
199
185
|
- - ">="
|
200
186
|
- !ruby/object:Gem::Version
|
201
|
-
version: 0.
|
187
|
+
version: 0.2.0
|
202
188
|
type: :development
|
203
189
|
prerelease: false
|
204
190
|
version_requirements: !ruby/object:Gem::Requirement
|
205
191
|
requirements:
|
206
192
|
- - ">="
|
207
193
|
- !ruby/object:Gem::Version
|
208
|
-
version: 0.
|
194
|
+
version: 0.2.0
|
209
195
|
- !ruby/object:Gem::Dependency
|
210
196
|
name: CmdShellMgr
|
211
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -237,45 +223,12 @@ files:
|
|
237
223
|
- README.md
|
238
224
|
- Rakefile
|
239
225
|
- bin/console
|
240
|
-
- bin/scoutui_driver
|
241
226
|
- bin/scoutui_driver.rb
|
242
227
|
- bin/setup
|
243
|
-
- examples/benchmark/ex.rb
|
244
|
-
- examples/capabilities/win10.chrome46.json
|
245
|
-
- examples/carmax/appmodel/search_results.json
|
246
|
-
- examples/carmax/commands/commands.yml
|
247
|
-
- examples/cmdshell/commands/hello.yml
|
248
|
-
- examples/converters/jsonupdate.rb
|
249
228
|
- examples/ex1/commands.holidays.yml
|
250
229
|
- examples/ex1/commands.yml
|
251
230
|
- examples/ex1/test-example.sh
|
252
231
|
- examples/ex1/test.config.json
|
253
|
-
- examples/ex2/appmodel/common.json
|
254
|
-
- examples/ex2/appmodel/page_model.json
|
255
|
-
- examples/ex2/appmodel/register.model.json
|
256
|
-
- examples/ex2/commands/commands.basic.appmodel.yml
|
257
|
-
- examples/ex2/commands/commands.yml
|
258
|
-
- examples/ex2/commands/ex1.yml
|
259
|
-
- examples/ex2/commands/ex1c.yml
|
260
|
-
- examples/ex2/commands/ex1d.yml
|
261
|
-
- examples/ex2/commands/ex2.hover.yml
|
262
|
-
- examples/ex2/commands/ex2.yml
|
263
|
-
- examples/ex2/data.json
|
264
|
-
- examples/ex2/test-configs/test.config.basic.json
|
265
|
-
- examples/ex2/test-configs/test.config.json
|
266
|
-
- examples/ex2/tests/run-test.sh
|
267
|
-
- examples/ex2/tests/test-basic-appmodel.sh
|
268
|
-
- examples/ex2/tests/test-example.sh
|
269
|
-
- examples/ex2/tests/test-example1a.sh
|
270
|
-
- examples/ex2/tests/test-example1b.sh
|
271
|
-
- examples/ex2/tests/test-example1c.sh
|
272
|
-
- examples/ex2/tests/test-example1d.sh
|
273
|
-
- examples/ex2/tests/test-example2.forms.eyes.sh
|
274
|
-
- examples/ex2/tests/test-example2.hover.eyes.sh
|
275
|
-
- examples/ex2/tests/test-example2.hover.sh
|
276
|
-
- examples/ex2/tests/test-example2.sh
|
277
|
-
- examples/ex2/tests/test-example3.sauce.sh
|
278
|
-
- examples/ex2/tests/test-example3.sh
|
279
232
|
- lib/scoutui.rb
|
280
233
|
- lib/scoutui/appmodel/q_model.rb
|
281
234
|
- lib/scoutui/base/assertions.rb
|
@@ -283,6 +236,7 @@ files:
|
|
283
236
|
- lib/scoutui/base/q_applitools.rb
|
284
237
|
- lib/scoutui/base/q_browser.rb
|
285
238
|
- lib/scoutui/base/q_form.rb
|
239
|
+
- lib/scoutui/base/q_har_mgr.rb
|
286
240
|
- lib/scoutui/base/requirements.rb
|
287
241
|
- lib/scoutui/base/test_context.rb
|
288
242
|
- lib/scoutui/base/test_data.rb
|
@@ -345,9 +299,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
345
299
|
version: '0'
|
346
300
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
347
301
|
requirements:
|
348
|
-
- - "
|
302
|
+
- - ">="
|
349
303
|
- !ruby/object:Gem::Version
|
350
|
-
version:
|
304
|
+
version: '0'
|
351
305
|
requirements: []
|
352
306
|
rubyforge_project:
|
353
307
|
rubygems_version: 2.6.2
|
data/bin/scoutui_driver
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
scoutui_driver.rb
|
data/examples/benchmark/ex.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
{
|
2
|
-
|
3
|
-
|
4
|
-
"search_results": {
|
5
|
-
|
6
|
-
|
7
|
-
"results": {
|
8
|
-
|
9
|
-
"header": {
|
10
|
-
"reqid": "REQ-HEADER",
|
11
|
-
"locator": "//span[text()='Applied filters']",
|
12
|
-
"visible_when": "title(Search Results)"
|
13
|
-
}
|
14
|
-
|
15
|
-
|
16
|
-
}
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
}
|
@@ -1,63 +0,0 @@
|
|
1
|
-
page:
|
2
|
-
name: Home
|
3
|
-
description: Navigate to a specified URL and wait until the expected elements are present
|
4
|
-
url: http://www.carmax.com
|
5
|
-
---
|
6
|
-
page:
|
7
|
-
name: Highlight Example
|
8
|
-
action: highlight(page(main).get(nav).get(findYourCar))
|
9
|
-
---
|
10
|
-
page:
|
11
|
-
timeout: 5
|
12
|
-
name: Click Find Your Car
|
13
|
-
action: click(page(main).get(nav).get(findYourCar))
|
14
|
-
expected:
|
15
|
-
wait1: //header//*[text()='Pricex']
|
16
|
-
---
|
17
|
-
page:
|
18
|
-
name: Basic Search
|
19
|
-
timeout: 5
|
20
|
-
action: click(page(main).get(nav).get(basic_search))
|
21
|
-
expected:
|
22
|
-
wait: page(basic_search).get(free_text)
|
23
|
-
assertions: [
|
24
|
-
elvis: {
|
25
|
-
"locator": "//button[@text()='Go']",
|
26
|
-
"visible_when": "visible(page(basic_search).get(free_text))"
|
27
|
-
},
|
28
|
-
better_assert: {
|
29
|
-
"locator": "page(basic_search)"
|
30
|
-
}
|
31
|
-
]
|
32
|
-
---
|
33
|
-
page:
|
34
|
-
name: Popup
|
35
|
-
timeout: 5
|
36
|
-
execute_when: visible(//area[@alt='no'])
|
37
|
-
action: click(//area[@alt='no'])
|
38
|
-
---
|
39
|
-
page:
|
40
|
-
name: Enter Porsche
|
41
|
-
action: type(page(basic_search).get(free_text), Porsche 911)
|
42
|
-
expected:
|
43
|
-
wait: //a[contains(@href, 'Porsche%20911')]
|
44
|
-
---
|
45
|
-
page:
|
46
|
-
action: highlight(//a[contains(@href, 'Porsche%20911')])
|
47
|
-
---
|
48
|
-
page:
|
49
|
-
action: mouseover(//a[contains(@href, 'Porsche%20911')])
|
50
|
-
---
|
51
|
-
page:
|
52
|
-
action: click(page(basic_search).get(go))
|
53
|
-
assertions: [
|
54
|
-
assert1: {
|
55
|
-
"locator": "page(search_results).get(results)"
|
56
|
-
}
|
57
|
-
]
|
58
|
-
---
|
59
|
-
page:
|
60
|
-
name: Pause after Nav.
|
61
|
-
action: pause
|
62
|
-
skipit: false
|
63
|
-
|
@@ -1,22 +0,0 @@
|
|
1
|
-
page:
|
2
|
-
name: Assign my vars
|
3
|
-
action: assignments
|
4
|
-
vars:
|
5
|
-
- assign(MyEntity, ScoutUI)
|
6
|
-
---
|
7
|
-
page:
|
8
|
-
name: Simple Cmd
|
9
|
-
id: MultiLs
|
10
|
-
action: defineCommand
|
11
|
-
commands: sed -e 's/domain/${MyEntity}/g' /tmp/userlist-v2.txt > /tmp/mydata.txt
|
12
|
-
---
|
13
|
-
page:
|
14
|
-
name: Run Multi
|
15
|
-
action: executeCommands
|
16
|
-
commands:
|
17
|
-
- id: MultiLs
|
18
|
-
---
|
19
|
-
page:
|
20
|
-
name: Pause afger MultiLs
|
21
|
-
action: pause
|
22
|
-
skip: false
|
@@ -1,31 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
def iterate(h)
|
4
|
-
h.each do |k, v|
|
5
|
-
if v.is_a?(Hash) || v.is_a?(Array)
|
6
|
-
iterate(v)
|
7
|
-
else
|
8
|
-
puts("k is #{k}, value is #{v}")
|
9
|
-
if v.match(/peter/i)
|
10
|
-
h[k]='Elvis'
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
|
17
|
-
h={
|
18
|
-
'person': {
|
19
|
-
'first': 'Peter',
|
20
|
-
'last': 'Kim',
|
21
|
-
'address': {
|
22
|
-
'city': 'Manhattan peter',
|
23
|
-
'state': 'New York'
|
24
|
-
}
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
|
29
|
-
iterate(h)
|
30
|
-
|
31
|
-
puts "h => #{h}"
|