scoutui 2.0.5.0.1.pre → 2.0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -2
- data/README.md +0 -7
- data/examples/ex1/phantom.chrome.json +4 -0
- data/examples/ex1/run.sh +85 -0
- data/examples/ex1/simple.yml +13 -0
- data/examples/ex1/win10.chromebeta.json +6 -0
- data/lib/scoutui/base/q_har_mgr.rb +63 -0
- data/lib/scoutui/base/visual_test_framework.rb +43 -1
- data/lib/scoutui/commands/exists_alert.rb +2 -0
- data/lib/scoutui/utils/utils.rb +7 -1
- data/lib/scoutui/version.rb +1 -1
- data/scoutui.gemspec +2 -3
- metadata +15 -58
- 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
- data/examples/headless/run.sh +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 383a354a74eedf65d433f2b457b74a56c3635698
|
4
|
+
data.tar.gz: 5927ee6a0e5035dbbc51497821f7e06f2470ee54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cbae5de50e6aea3e8b6fd6fd487dde26e0c383887a414df2ae4182f16c4d476ce13a23048686bac525b53ae085d57de42eaa872fb8c83fb19055c29d91f2c0a
|
7
|
+
data.tar.gz: ebb6cb6fdf715270eb1239bcfb61400cde282ddb5b2b5c9b9e7476f0347e14d424232ec49018566e993716438c4971ccaf852daa3def9b6feb4e94fde4203b35
|
data/.gitignore
CHANGED
data/README.md
CHANGED
data/examples/ex1/run.sh
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
##
|
3
|
+
# H20Dragon
|
4
|
+
##
|
5
|
+
|
6
|
+
##
|
7
|
+
# Execute test on Chrome locally.
|
8
|
+
##
|
9
|
+
run_chrome()
|
10
|
+
{
|
11
|
+
CMD=$1
|
12
|
+
ruby $SCOUTUI_BIN --config ./test.config.json \
|
13
|
+
--browser chrome \
|
14
|
+
--host "http://www.elvis-presley.com" \
|
15
|
+
--viewport 800x600 \
|
16
|
+
--dut ${CMD} --debug
|
17
|
+
}
|
18
|
+
|
19
|
+
##
|
20
|
+
# Execute test on Firefox locally.
|
21
|
+
##
|
22
|
+
run_firefox()
|
23
|
+
{
|
24
|
+
CMD=$1
|
25
|
+
ruby $SCOUTUI_BIN --config ./test.config.json \
|
26
|
+
--browser firefox \
|
27
|
+
--host "http://www.elvis-presley.com" \
|
28
|
+
--viewport 800x600 \
|
29
|
+
--dut ${CMD} --debug
|
30
|
+
}
|
31
|
+
|
32
|
+
##
|
33
|
+
# Execute test on phantom (GhostDriver)
|
34
|
+
##
|
35
|
+
run_headless()
|
36
|
+
{
|
37
|
+
CMD=$1
|
38
|
+
ruby $SCOUTUI_BIN --config ./test.config.json \
|
39
|
+
--browser phantomjs \
|
40
|
+
--host "http://www.elvis-presley.com" \
|
41
|
+
--viewport 800x600 \
|
42
|
+
--dut ${CMD} --debug
|
43
|
+
}
|
44
|
+
|
45
|
+
|
46
|
+
##
|
47
|
+
# Run tests on ghostdriver (phantom) as defined in
|
48
|
+
# its capabilities file.
|
49
|
+
##
|
50
|
+
run_headless2()
|
51
|
+
{
|
52
|
+
CMD=$1
|
53
|
+
ruby $SCOUTUI_BIN --config ./test.config.json \
|
54
|
+
--capabilities ./phantom.chrome.json \
|
55
|
+
--host "http://www.elvis-presley.com" \
|
56
|
+
--viewport 800x600 \
|
57
|
+
--dut ${CMD} --debug
|
58
|
+
}
|
59
|
+
|
60
|
+
|
61
|
+
##
|
62
|
+
# Run a test on ghostdriver (phantom) defined by
|
63
|
+
# capabilities files, while taking screen shots.
|
64
|
+
##
|
65
|
+
run_screenshots_phantom()
|
66
|
+
{
|
67
|
+
CMD=$1
|
68
|
+
ruby $SCOUTUI_BIN --config ./test.config.json \
|
69
|
+
--capabilities ./phantom.chrome.json \
|
70
|
+
--screenshots:run true \
|
71
|
+
--screenshots:dir /tmp/phantom \
|
72
|
+
--host "http://www.elvis-presley.com" \
|
73
|
+
--viewport 800x600 \
|
74
|
+
--dut ${CMD} --debug
|
75
|
+
}
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
run_chrome ./simple.yml
|
80
|
+
run_firefox ./simple.yml
|
81
|
+
|
82
|
+
#run_headless ./simple.yml
|
83
|
+
#run_headless2 ./simple.yml
|
84
|
+
#run_screenshots_phantom ./simple.yml
|
85
|
+
|
@@ -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
|
@@ -12,6 +12,28 @@ module Scoutui::Base
|
|
12
12
|
|
13
13
|
end
|
14
14
|
|
15
|
+
def self.takeScreenShot(drv, _name)
|
16
|
+
_saveScreenAs=Scoutui::Utils::TestUtils.instance.sanitize_filename(_name)
|
17
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " ScreenSave : #{_saveScreenAs}"
|
18
|
+
|
19
|
+
rc=false
|
20
|
+
begin
|
21
|
+
|
22
|
+
if !File.directory?(Scoutui::Utils::TestUtils.instance.screenShotsDir)
|
23
|
+
FileUtils::mkdir_p Scoutui::Utils::TestUtils.instance.screenShotsDir
|
24
|
+
end
|
25
|
+
|
26
|
+
_fullPath=Scoutui::Utils::TestUtils.instance.screenShotsDir + '/' + _saveScreenAs + '.png'
|
27
|
+
drv.save_screenshot(_fullPath)
|
28
|
+
|
29
|
+
rc=true
|
30
|
+
rescue => ex
|
31
|
+
Scoutui::Logger::LogMgr.instance.warn __FILE__ + (__LINE__).to_s + " Error during processing screenshot with name #{_name.to_s}: #{ex}"
|
32
|
+
Scoutui::Logger::LogMgr.instance.warn __FILE__ + (__LINE__).to_s + "Backtrace:\n\t#{ex.backtrace.join("\n\t")}"
|
33
|
+
end
|
34
|
+
|
35
|
+
rc
|
36
|
+
end
|
15
37
|
|
16
38
|
def self.processPageElement(my_driver, k, xpath)
|
17
39
|
|
@@ -1336,6 +1358,7 @@ module Scoutui::Base
|
|
1336
1358
|
if Scoutui::Utils::TestUtils.instance.isFailFast? && !_command.passed?
|
1337
1359
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Failfast.";
|
1338
1360
|
Scoutui::Utils::TestUtils.instance.setState(:abort)
|
1361
|
+
takeScreenShot(my_driver, "step_#{i}.failed")
|
1339
1362
|
return
|
1340
1363
|
end
|
1341
1364
|
Scoutui::Logger::LogMgr.instance.warn __FILE__ + (__LINE__).to_s + " Command #{_action} was already executed in Strategy"
|
@@ -1372,6 +1395,15 @@ module Scoutui::Base
|
|
1372
1395
|
end
|
1373
1396
|
|
1374
1397
|
if !_assertResult && Scoutui::Utils::TestUtils.instance.isFailFast?
|
1398
|
+
## Take failing snapshot
|
1399
|
+
|
1400
|
+
_shotName="step_#{i}.failed"
|
1401
|
+
if !_name.nil?
|
1402
|
+
_shotName = "#{_name.to_s}.#{_shotName}"
|
1403
|
+
end
|
1404
|
+
|
1405
|
+
takeScreenShot(my_driver, _shotName)
|
1406
|
+
|
1375
1407
|
Scoutui::Utils::TestUtils.instance.setState(:abort, 'Failed assertion with failfast enabled.')
|
1376
1408
|
return
|
1377
1409
|
end
|
@@ -1409,7 +1441,17 @@ module Scoutui::Base
|
|
1409
1441
|
|
1410
1442
|
end
|
1411
1443
|
|
1412
|
-
|
1444
|
+
|
1445
|
+
if Scoutui::Utils::TestUtils.instance.screenShots? || (Scoutui::Utils::TestUtils.instance.screenShotsOnFailure? && !_assertResult)
|
1446
|
+
_shotName="step_#{i}"
|
1447
|
+
if !_name.nil?
|
1448
|
+
_shotName = "#{_name.to_s}.#{_shotName}"
|
1449
|
+
end
|
1450
|
+
|
1451
|
+
takeScreenShot(my_driver, _shotName)
|
1452
|
+
end
|
1453
|
+
|
1454
|
+
if false && Scoutui::Utils::TestUtils.instance.screenShots?
|
1413
1455
|
_saveScreenAs=Scoutui::Utils::TestUtils.instance.sanitize_filename(_name)
|
1414
1456
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " ScreenSave : #{_saveScreenAs}"
|
1415
1457
|
|
@@ -45,6 +45,8 @@ module Scoutui::Commands
|
|
45
45
|
Testmgr::TestReport.instance.getReq(_req).testcase(_action).add(rc, "Verify processed alert")
|
46
46
|
|
47
47
|
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " ExistsAlert() => #{rc.to_s}" if Scoutui::Utils::TestUtils.instance.isDebug?
|
48
|
+
|
49
|
+
setResult(rc)
|
48
50
|
rc
|
49
51
|
|
50
52
|
end
|
data/lib/scoutui/utils/utils.rb
CHANGED
@@ -55,6 +55,7 @@ module Scoutui::Utils
|
|
55
55
|
@options[:fail_fast]=false
|
56
56
|
@options[:screenshots]=false
|
57
57
|
@options[:screenshots_dir]=nil
|
58
|
+
@options[:screenshots_only_on_failure]=true
|
58
59
|
@options[:retries]=1
|
59
60
|
|
60
61
|
|
@@ -284,8 +285,9 @@ module Scoutui::Utils
|
|
284
285
|
|
285
286
|
|
286
287
|
opt.on('--screenshots Bool', [:true, :false]) { |o| @options[:screenshots] = !o.match(/true/i).nil? }
|
287
|
-
opt.on('--screenshots:run Bool'
|
288
|
+
opt.on('--screenshots:run Bool') { |o| @options[:screenshots] = !o.match(/true/i).nil? }
|
288
289
|
opt.on('--screenshots:dir DIR') { |o| @options[:screenshots_dir] = o.to_s }
|
290
|
+
opt.on('--screenshots:onfailure Bool') { |o| @options[:screenshots_only_on_failure] = o.to_s }
|
289
291
|
|
290
292
|
opt.on('--role ROLE') { |o|
|
291
293
|
@options[:role]=o
|
@@ -403,6 +405,10 @@ module Scoutui::Utils
|
|
403
405
|
@options[:screenshots]
|
404
406
|
end
|
405
407
|
|
408
|
+
def screenShotsOnFailure?
|
409
|
+
@options[:screenshots_only_on_failure]
|
410
|
+
end
|
411
|
+
|
406
412
|
def screenShotsDir
|
407
413
|
@options[:screenshots_dir]
|
408
414
|
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.5.
|
4
|
+
version: 2.0.5.1
|
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-21 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,46 +223,16 @@ 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
|
230
|
+
- examples/ex1/phantom.chrome.json
|
231
|
+
- examples/ex1/run.sh
|
232
|
+
- examples/ex1/simple.yml
|
251
233
|
- examples/ex1/test-example.sh
|
252
234
|
- examples/ex1/test.config.json
|
253
|
-
- examples/
|
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
|
-
- examples/headless/run.sh
|
235
|
+
- examples/ex1/win10.chromebeta.json
|
280
236
|
- lib/scoutui.rb
|
281
237
|
- lib/scoutui/appmodel/q_model.rb
|
282
238
|
- lib/scoutui/base/assertions.rb
|
@@ -284,6 +240,7 @@ files:
|
|
284
240
|
- lib/scoutui/base/q_applitools.rb
|
285
241
|
- lib/scoutui/base/q_browser.rb
|
286
242
|
- lib/scoutui/base/q_form.rb
|
243
|
+
- lib/scoutui/base/q_har_mgr.rb
|
287
244
|
- lib/scoutui/base/requirements.rb
|
288
245
|
- lib/scoutui/base/test_context.rb
|
289
246
|
- lib/scoutui/base/test_data.rb
|
@@ -346,9 +303,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
346
303
|
version: '0'
|
347
304
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
348
305
|
requirements:
|
349
|
-
- - "
|
306
|
+
- - ">="
|
350
307
|
- !ruby/object:Gem::Version
|
351
|
-
version:
|
308
|
+
version: '0'
|
352
309
|
requirements: []
|
353
310
|
rubyforge_project:
|
354
311
|
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}"
|