scoutui 2.0.5.0.1.pre → 2.0.5.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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -2
  3. data/README.md +0 -7
  4. data/examples/ex1/phantom.chrome.json +4 -0
  5. data/examples/ex1/run.sh +85 -0
  6. data/examples/ex1/simple.yml +13 -0
  7. data/examples/ex1/win10.chromebeta.json +6 -0
  8. data/lib/scoutui/base/q_har_mgr.rb +63 -0
  9. data/lib/scoutui/base/visual_test_framework.rb +43 -1
  10. data/lib/scoutui/commands/exists_alert.rb +2 -0
  11. data/lib/scoutui/utils/utils.rb +7 -1
  12. data/lib/scoutui/version.rb +1 -1
  13. data/scoutui.gemspec +2 -3
  14. metadata +15 -58
  15. data/bin/scoutui_driver +0 -1
  16. data/examples/benchmark/ex.rb +0 -16
  17. data/examples/capabilities/win10.chrome46.json +0 -6
  18. data/examples/carmax/appmodel/search_results.json +0 -27
  19. data/examples/carmax/commands/commands.yml +0 -63
  20. data/examples/cmdshell/commands/hello.yml +0 -22
  21. data/examples/converters/jsonupdate.rb +0 -31
  22. data/examples/ex2/appmodel/common.json +0 -51
  23. data/examples/ex2/appmodel/page_model.json +0 -106
  24. data/examples/ex2/appmodel/register.model.json +0 -42
  25. data/examples/ex2/commands/commands.basic.appmodel.yml +0 -8
  26. data/examples/ex2/commands/commands.yml +0 -115
  27. data/examples/ex2/commands/ex1.yml +0 -7
  28. data/examples/ex2/commands/ex1c.yml +0 -8
  29. data/examples/ex2/commands/ex1d.yml +0 -22
  30. data/examples/ex2/commands/ex2.hover.yml +0 -43
  31. data/examples/ex2/commands/ex2.yml +0 -24
  32. data/examples/ex2/data.json +0 -6
  33. data/examples/ex2/test-configs/test.config.basic.json +0 -12
  34. data/examples/ex2/test-configs/test.config.json +0 -31
  35. data/examples/ex2/tests/run-test.sh +0 -125
  36. data/examples/ex2/tests/test-basic-appmodel.sh +0 -14
  37. data/examples/ex2/tests/test-example.sh +0 -39
  38. data/examples/ex2/tests/test-example1a.sh +0 -16
  39. data/examples/ex2/tests/test-example1b.sh +0 -13
  40. data/examples/ex2/tests/test-example1c.sh +0 -15
  41. data/examples/ex2/tests/test-example1d.sh +0 -15
  42. data/examples/ex2/tests/test-example2.forms.eyes.sh +0 -40
  43. data/examples/ex2/tests/test-example2.hover.eyes.sh +0 -40
  44. data/examples/ex2/tests/test-example2.hover.sh +0 -26
  45. data/examples/ex2/tests/test-example2.sh +0 -43
  46. data/examples/ex2/tests/test-example3.sauce.sh +0 -77
  47. data/examples/ex2/tests/test-example3.sh +0 -41
  48. data/examples/headless/run.sh +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6bb3a8c9e7b3485309b9fe02b2f9b4cff101749
4
- data.tar.gz: 7c86699d7696051c8cbbb663e6f722da88873b3b
3
+ metadata.gz: 383a354a74eedf65d433f2b457b74a56c3635698
4
+ data.tar.gz: 5927ee6a0e5035dbbc51497821f7e06f2470ee54
5
5
  SHA512:
6
- metadata.gz: debb1d0a24d8f2b025ca64fa83546db09fdb4cd9769a29b2848f02b9fc77f35d068762bddfdd264afada96f6f3b5ce7c852ea98649208251c6bb35e8311a0f03
7
- data.tar.gz: d9a5e11e1d741fa4475d6c766c13572397b3d8872c25a6a25ecd1fe51774ca4bd7f9764779623278188ca0d81f562ad3cdfe7e9aa0e4d8b66496be52370750f6
6
+ metadata.gz: 4cbae5de50e6aea3e8b6fd6fd487dde26e0c383887a414df2ae4182f16c4d476ce13a23048686bac525b53ae085d57de42eaa872fb8c83fb19055c29d91f2c0a
7
+ data.tar.gz: ebb6cb6fdf715270eb1239bcfb61400cde282ddb5b2b5c9b9e7476f0347e14d424232ec49018566e993716438c4971ccaf852daa3def9b6feb4e94fde4203b35
data/.gitignore CHANGED
@@ -4,7 +4,9 @@
4
4
  /_yardoc/
5
5
  /coverage/
6
6
  /doc/
7
+ /pkg/
7
8
  /spec/reports/
8
- /test/gateway
9
9
  /tmp/
10
- /test/travel
10
+ /.idea
11
+ /.travis.yml
12
+
data/README.md CHANGED
@@ -59,13 +59,6 @@ To run unit tests:
59
59
  To run a specific unit test:
60
60
 
61
61
  $ rspec spec/json_spec.rb
62
-
63
- To build:
64
-
65
- $ bundle exec rake build
66
-
67
- To push the build (gem)
68
- $ gem push <gem file>
69
62
 
70
63
  ## Running the examples
71
64
 
@@ -0,0 +1,4 @@
1
+ {
2
+ "browser": "phantomjs",
3
+ "useragent": "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"
4
+ }
@@ -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,13 @@
1
+ page:
2
+ name: Home
3
+ action: navigate(http://www.elvis.com)
4
+ ---
5
+ page:
6
+ name: TAB
7
+ action: type(__TAB__)
8
+ do:
9
+ - focused.Highlight
10
+ - press(__TAB__)
11
+ until:
12
+ - true
13
+
@@ -0,0 +1,6 @@
1
+ {
2
+ "platform": "Windows 10",
3
+ "browser": "chrome",
4
+ "version": "beta",
5
+ "screenResolution": "1280x1024"
6
+ }
@@ -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
- if Scoutui::Utils::TestUtils.instance.screenShots?
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
@@ -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', [:true, :false]) { |o| @options[:screenshots] = !o.match(/true/i).nil? }
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
@@ -1,3 +1,3 @@
1
1
  module Scoutui
2
- VERSION = "2.0.5.0.1.pre"
2
+ VERSION = "2.0.5.1"
3
3
  end
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 "tiny_tds"
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.0.1.pre
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-15 00:00:00.000000000 Z
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: '0'
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: '0'
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.1.1.1.pre
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.1.1.1.pre
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/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
- - 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: 1.3.1
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
@@ -1,16 +0,0 @@
1
-
2
-
3
-
4
- def foo(opts)
5
-
6
- puts opts
7
-
8
-
9
- end
10
-
11
-
12
-
13
-
14
- foo(rover: 'Rover')
15
-
16
-
@@ -1,6 +0,0 @@
1
- {
2
- "platform": "Windows 10",
3
- "browser": "chrome",
4
- "version": "46.0",
5
- "screenResolution": "1024x768"
6
- }
@@ -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}"