scoutui 2.0.3.21.pre → 2.0.3.22.pre

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
  SHA1:
3
- metadata.gz: a6cbe80ef6254af1766a9720894597289d4d064f
4
- data.tar.gz: 10ff1944d742307f6ca2f00d0bd88010ad5967a2
3
+ metadata.gz: 9b6949c1561c7804842c874fab22bd65cba0d8a0
4
+ data.tar.gz: f5f046b973cd9591b57c2479d06f84c5197aa665
5
5
  SHA512:
6
- metadata.gz: d00da1fa824b2d4d92ba0bc6639852cf877126d4f563abcb049bb8b2cf507479c37e5ccdb71635fe04f24fd3a8584113b203346087d023c01728c3263afcca8f
7
- data.tar.gz: f354494c43092620421531e0c39cfff40e897352c27e02da900dc62df405101c3ee0d5a03fae7e95e73530dfbe1f401b0aff3af65fad6a0340b81f3ba45667e3
6
+ metadata.gz: 2f1f3c9aaaf2e12619fe95b4f46097d2af812391b1ac25393b05dc779ab348abd0b6b830356e8caa4054fcfafa1436dfcac984fbc9f431bb1c573cd37f8fe02d
7
+ data.tar.gz: 3c71c4a7e4af5cd62f3f98783f0b27786076f91655e09de03674b9b6fb4342269ee300f722886a57043e09755a48eb7d2f99cc65684aeba2f7feaca3382c47ba
@@ -0,0 +1,16 @@
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
+
@@ -0,0 +1,16 @@
1
+
2
+
3
+ require 'benchmark'
4
+
5
+
6
+
7
+ x=Benchmark.measure { "a"*1_000_000_000 }
8
+
9
+
10
+ x=Benchmark.measure { sleep 1 }
11
+
12
+ puts x.class.to_s
13
+
14
+ puts x
15
+
16
+ puts x.real
@@ -0,0 +1,10 @@
1
+ {
2
+ "obstacle": {
3
+
4
+ "tinymce": {
5
+ "locator" : "//*[@id='tinymce']",
6
+ "vislble_when": "always"
7
+ }
8
+
9
+ }
10
+ }
@@ -0,0 +1,100 @@
1
+ #!/usr/bin/env bash
2
+
3
+
4
+ ##
5
+ # Pre-req - Sauce Connect is running
6
+ ##
7
+
8
+ setup()
9
+ {
10
+ HOST="http://the-internet.herokuapp.com/tinymce"
11
+
12
+ CAPS="--capabilities ../../common/capabilities/win10.chrome50.json"
13
+ CAPS="--capabilities ../capabilities/win10.ff46.json"
14
+ # CAPS=
15
+ # CAPS="--sauce:browser chrome --sauce:platform \"Windows 10\" --sauce:version 46.0 --sauce:resolution 1024x768"
16
+
17
+ USER_ID="terrybrown@commasavvy.com"
18
+ PASSWORD="password1"
19
+ TESTCFG=../testconfig/test.config.json
20
+
21
+
22
+ TITLE="CARMAX"
23
+ VIEWPORT="1024x768"
24
+
25
+ MODEL="../appmodel/main.nav.json,../appmodel/search_results.json"
26
+
27
+ EYES="--eyes --app ${TITLE} --title ${TITLE} --match layout2"
28
+ EYES=
29
+
30
+ SAUCE="--sauce --sauce_name ${TITLE}"
31
+ # SAUCE="--browser chrome"
32
+
33
+ CMD="../commands/commands.yml"
34
+ CMD="../commands/basic_search.yml"
35
+
36
+ CMD="../commands/home.commands.yml"
37
+
38
+ }
39
+
40
+
41
+
42
+ run1()
43
+ {
44
+
45
+ EYES=
46
+ EYES="--eyes --app ${TITLE}.1280 --title ${TITLE} --match layout2"
47
+ VIEWPORT="--viewport 1024x670"
48
+ # VIEWPORT="--viewport 1024x722"
49
+ VIEWPORT=
50
+ # --sauce:platform "Windows 10" --sauce:build SmokeEx --sauce:name Smokes --sauce:browsername "MicrosoftEdge" --sauce:browser "MS Edge 13.10586" --sauce:version "13.10586" --sauce:resolution "1280x1024" \
51
+
52
+ ruby $SCOUTUI_BIN \
53
+ --config ${TESTCFG} \
54
+ --user "expense.admin@scoutui.com" --password password1 \
55
+ --diff /tmp/vt \
56
+ --pages ../appmodel/model.json \
57
+ --eyes:run false \
58
+ --eyes:viewport 1024x670 \
59
+ --eyes:app "CarMaxTestApp" \
60
+ --eyes:title "CarMaxTitle" \
61
+ --sauce:run false \
62
+ --sauce:platform "Windows 10" \
63
+ --sauce:build SmokeEx \
64
+ --sauce:name Smokes \
65
+ --sauce:browser "chrome" \
66
+ --sauce:version "beta" \
67
+ --sauce:resolution "1280x1024" \
68
+ --host ${HOST} \
69
+ --debug \
70
+ --dut "${CMD}"
71
+
72
+ }
73
+
74
+ run2()
75
+ {
76
+
77
+ CAPS="--capabilities ../capabilities/win10.ff46.json"
78
+
79
+ ruby $SCOUTUI_BIN \
80
+ --config ${TESTCFG} \
81
+ --user "expense.admin@scoutui.com" --password password1 \
82
+ ${EYES} \
83
+ --diff /tmp/vt \
84
+ --viewport ${VIEWPORT} \
85
+ ${SAUCE} \
86
+ ${CAPS} \
87
+ --sauce:platform PETER.0 \
88
+ --host ${HOST} \
89
+ --pages ${MODEL} \
90
+ --debug \
91
+ --dut "${CMD}"
92
+
93
+ }
94
+
95
+ setup
96
+ run1
97
+
98
+
99
+
100
+
@@ -361,6 +361,12 @@ module Scoutui::Base
361
361
  # http://stackoverflow.com/questions/15164742/combining-implicit-wait-and-explicit-wait-together-results-in-unexpected-wait-ti#answer-15174978
362
362
  def self.getObject(drv, obj, _timeout=nil)
363
363
 
364
+
365
+ if obj.nil?
366
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " getObject() - null obj passed."
367
+ return nil
368
+ end
369
+
364
370
  if _timeout.nil?
365
371
  _timeout = Scoutui::Utils::TestUtils.instance.getDefaultWait
366
372
  end
@@ -84,15 +84,15 @@ module Scoutui::Base
84
84
  _rc = k.match(/\$\{(.*)\}$/)
85
85
 
86
86
  # Needs refactoring!
87
- if k=='${userid}'
87
+ if k=='${userid}' || k=='__USERID__'
88
88
  k=:userid
89
- elsif k=='${password}'
89
+ elsif k=='${password}' || k=='__PASSWORD__'
90
90
  k=:password
91
- elsif k=='${host}'
91
+ elsif k=='${host}' || k=='__HOST__'
92
92
  k=:host
93
93
  elsif k=='${lang}' || k=='${__LOC__}' || k=='${LOC}' || k=='__LOC__'
94
94
  k=:lang
95
- elsif k=='${browser}'
95
+ elsif k=='${browser}' || k=='__BROWSER__'
96
96
  k=:browser
97
97
  elsif k.is_a?(Symbol)
98
98
  foundKey=true
@@ -8,6 +8,7 @@ module Scoutui::Commands
8
8
  def execute(drv, e=nil)
9
9
  @drv=drv if !drv.nil?
10
10
  rc=nil
11
+ obj=nil
11
12
 
12
13
  _req = Scoutui::Utils::TestUtils.instance.getReq()
13
14
 
@@ -16,21 +17,22 @@ module Scoutui::Commands
16
17
 
17
18
  Scoutui::Logger::LogMgr.instance.command.info __FILE__ + (__LINE__).to_s + " assignVar => #{_uservar} : #{_condition}"
18
19
 
20
+ expectObj=!_condition.match(/^\s*(text|value)\s*\(/i).nil?
19
21
 
20
- if _condition.match(/^\s*(text|value)\s*\(/i)
22
+ if expectObj
21
23
  _locator=_condition.match(/^\s*(text|value)\s*\((.*)\)\s*$/i)[2].to_s.strip
24
+ _locator = Scoutui::Base::UserVars.instance.normalize(_locator)
25
+ Scoutui::Logger::LogMgr.instance.command.info __FILE__ + (__LINE__).to_s + " | translate : #{_locator}" if Scoutui::Utils::TestUtils.instance.isDebug?
26
+ obj = Scoutui::Base::QBrowser.findElement(@drv, _locator, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
27
+ else
28
+ Scoutui::Base::UserVars.instance.setVar(_uservar, _condition)
29
+ rc=_condition
22
30
  end
23
31
 
24
- _locator = Scoutui::Base::UserVars.instance.normalize(_locator)
25
-
26
- Scoutui::Logger::LogMgr.instance.command.info __FILE__ + (__LINE__).to_s + " | translate : #{_locator}" if Scoutui::Utils::TestUtils.instance.isDebug?
27
32
 
28
33
  begin
29
34
 
30
- obj = Scoutui::Base::QBrowser.findElement(@drv, _locator, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
31
-
32
-
33
- if obj
35
+ if !obj.nil?
34
36
 
35
37
  # Refactor in qbrowser
36
38
 
@@ -49,23 +51,8 @@ module Scoutui::Commands
49
51
 
50
52
  puts __FILE__ + (__LINE__).to_s + " rc :: #{Scoutui::Base::UserVars.instance.getVar(_uservar)}"
51
53
 
52
-
53
-
54
- # puts __FILE__ + (__LINE__).to_s + " Pause"; gets
55
-
56
-
57
-
58
-
59
54
  if isDisplayed
60
-
61
- # isEnabled = wait.until { obj.enabled? }
62
- # Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " obj is enabled : #{isEnabled}"
63
- # obj.click
64
- # _clicked=true
65
-
66
- # page_elt = Scoutui::Utils::TestUtils.instance.getPageElement(_locator)
67
- # Scoutui::Logger::LogMgr.instance.debug "PageElement(#{_locator}) => #{page_elt}"
68
- # _whenClicked(page_elt)
55
+ ;
69
56
  else
70
57
  Scoutui::Logger::LogMgr.instance.warn __FILE__ + (__LINE__).to_s + " Element, #{_locator} is not displayed."
71
58
  end
@@ -77,11 +64,10 @@ module Scoutui::Commands
77
64
  Scoutui::Logger::LogMgr.instance.warn "Backtrace:\n\t#{ex.backtrace.join("\n\t")}"
78
65
  end
79
66
 
80
- Scoutui::Logger::LogMgr.instance.asserts.info "Verify object to assign exists #{_locator} : #{obj.class.to_s} - #{!obj.nil?.to_s}"
81
- # Scoutui::Logger::LogMgr.instance.asserts.info "Verify clicked #{_locator} - #{_clicked.to_s}"
82
-
83
- Testmgr::TestReport.instance.getReq(_req).testcase('click').add(!obj.nil?, "Verify object to assign exists #{_locator} : #{obj.class.to_s}")
84
- # Testmgr::TestReport.instance.getReq(_req).testcase('click').add(_clicked, "Verify clicked #{_locator}")
67
+ if expectObj
68
+ Scoutui::Logger::LogMgr.instance.asserts.info "Verify object to assign exists #{_locator} : #{obj.class.to_s} - #{!obj.nil?.to_s}"
69
+ Testmgr::TestReport.instance.getReq(_req).testcase('click').add(!obj.nil?, "Verify object to assign exists #{_locator} : #{obj.class.to_s}")
70
+ end
85
71
 
86
72
  setResult(!rc.nil?)
87
73
  end
@@ -118,6 +118,7 @@ module Scoutui::Commands
118
118
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " highlight then click : #{obj}"
119
119
  end
120
120
 
121
+ @drv.action.move_to(obj).perform
121
122
  obj.click
122
123
 
123
124
  _clicked=true
@@ -140,7 +141,7 @@ module Scoutui::Commands
140
141
  end
141
142
 
142
143
  rescue => ex
143
- Scoutui::Logger::LogMgr.instance.warn __FILE__ + (__LINE__).to_s + " Error during processing: #{ex.message}"
144
+ Scoutui::Logger::LogMgr.instance.warn __FILE__ + (__LINE__).to_s + " #{ex.class.to_s} : Error during processing: #{ex.message}"
144
145
  Scoutui::Logger::LogMgr.instance.warn "Backtrace:\n\t#{ex.backtrace.join("\n\t")}"
145
146
  end
146
147
 
@@ -1,3 +1,4 @@
1
+ require 'benchmark'
1
2
 
2
3
  module Scoutui::Commands
3
4
 
@@ -10,11 +11,12 @@ module Scoutui::Commands
10
11
  attr_accessor :executed
11
12
  attr_accessor :executed_result
12
13
  attr_accessor :stanza
14
+ attr_accessor :bm
13
15
 
14
16
  def initialize(_cmd, _drv=nil)
15
17
  Scoutui::Logger::LogMgr.instance.commands.debug __FILE__ + (__LINE__).to_s + " Command.init: #{_cmd.to_s}"
16
18
 
17
-
19
+ @bm=nil
18
20
  @cmd=_cmd
19
21
 
20
22
  if _cmd.is_a?(Hash) && _cmd.has_key?('page') && _cmd['page'].has_key?('action')
@@ -55,6 +57,17 @@ module Scoutui::Commands
55
57
  @rc
56
58
  end
57
59
 
60
+ def run(opts) # (_drv=nil, _dut=nil)
61
+ _drv=opts[:driver]
62
+ _dut=opts.has_key?(:dut) ? opts[:dut] : nil
63
+
64
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " = start run(#{@cmd}) ="
65
+ @bm=Benchmark.measure { execute(_drv, _dut) }
66
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " = end run(#{@cmd}) : #{@bm.real}"
67
+
68
+ Scoutui::Logger::LogMgr.instance.benchmarks.info "#{@cmd} => #{@bm.real}"
69
+ end
70
+
58
71
  def execute(_drv=nil, _dut=nil)
59
72
  raise NotImplementedError
60
73
  end
@@ -53,7 +53,8 @@ module Scoutui::Commands
53
53
  elsif Scoutui::Commands::Utils.instance.isAssignVar?(_action)
54
54
  _cmd='assignvar'
55
55
  _c = Scoutui::Commands::AssignVar.new(_action)
56
- _c.execute(my_driver, e)
56
+ _c.run(driver: my_driver, dut: e)
57
+
57
58
  elsif Scoutui::Commands::Utils.instance.isSelectWindow?(_action)
58
59
  _cmd='SelectWindow'
59
60
  _c = Scoutui::Commands::SelectWindow.new(_action)
@@ -61,7 +62,9 @@ module Scoutui::Commands
61
62
  elsif Scoutui::Commands::Utils.instance.isClick?(_action)
62
63
  _cmd='Click'
63
64
  _c = Scoutui::Commands::ClickObject.new(_action)
64
- _c.execute(my_driver, e)
65
+
66
+ _c.run(driver: my_driver, dut: e)
67
+
65
68
 
66
69
  if e[STEP_KEY].has_key?('then')
67
70
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " then => #{e[STEP_KEY]['then]']}"
@@ -86,7 +89,7 @@ module Scoutui::Commands
86
89
  elsif Scoutui::Commands::Utils.instance.isHighlight?(_action)
87
90
  _cmd="Highlight"
88
91
  _c = Scoutui::Commands::Highlight.new(_action)
89
- rc = _c.execute(my_driver, e)
92
+ _c.run(driver: my_driver, dut: e)
90
93
 
91
94
  elsif Scoutui::Commands::Utils.instance.isMouseOver?(_action)
92
95
  _cmd='MouseOver'
@@ -96,7 +99,7 @@ module Scoutui::Commands
96
99
  elsif Scoutui::Commands::Utils.instance.isSelect?(_action)
97
100
  _cmd='Select'
98
101
  _c = Scoutui::Commands::SelectObject.new(_action)
99
- _c.execute(my_driver, e)
102
+ _c.run(driver: my_driver, dut: e)
100
103
 
101
104
  elsif Scoutui::Commands::Utils.instance.isFillForm?(_action)
102
105
 
@@ -131,25 +134,24 @@ module Scoutui::Commands
131
134
  elsif Scoutui::Commands::Utils.instance.isNavigate?(_action)
132
135
  _cmd='Navigate'
133
136
  _c = Scoutui::Commands::UpdateUrl.new(_action)
134
- _c.execute(my_driver)
137
+ _c.run(driver: my_driver)
135
138
 
136
139
  elsif Scoutui::Commands::Utils.instance.isVerifyElt?(_action)
137
140
  _cmd='VerifyElement'
138
-
139
141
  _c = Scoutui::Commands::VerifyElement.new(_action)
140
- _c.execute(my_driver)
142
+ _c.run(driver: my_driver)
141
143
 
142
144
  elsif Scoutui::Commands::Utils.instance.isType?(_action)
143
145
  _cmd='Type'
144
146
  _c = Scoutui::Commands::Type.new(_action)
145
- _c.execute(my_driver)
147
+ _c.run(driver: my_driver)
146
148
  else
147
149
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Unknown command : #{_action}"
148
150
  rc=false
149
151
  end
150
152
 
151
153
  rescue => e
152
- Scoutui::Logger::LogMgr.instance.debug "Error during processing: #{$!}"
154
+ Scoutui::Logger::LogMgr.instance.debug "#{e.class.to_s} Error during processing: #{$!}"
153
155
  Scoutui::Logger::LogMgr.instance.debug "Backtrace:\n\t#{e.backtrace.join("\n\t")}"
154
156
  puts "Backtrace:\n\t#{e.backtrace.join("\n\t")}"
155
157
  _aborted=true
@@ -7,6 +7,7 @@ module Scoutui::Commands
7
7
  def _highlight(obj, e=nil)
8
8
  _rc=false
9
9
 
10
+ Scoutui::Logger::LogMgr.instance.command.info __FILE__ + (__LINE__).to_s + " highlight => #{obj}"
10
11
  if !obj.nil?
11
12
 
12
13
  if e.is_a?(Hash) && e.has_key?('page') && e['page'].has_key?('style')
@@ -41,8 +42,16 @@ module Scoutui::Commands
41
42
  locators = e['page']['locators']
42
43
  end
43
44
 
44
- locators.each do |loc|
45
- obj = Scoutui::Base::QBrowser.getObject(@drv, loc, Scoutui::Commands::Utils.instance.getTimeout)
45
+ locators.each do |elt|
46
+
47
+ _loc = Scoutui::Base::UserVars.instance.normalize(elt)
48
+
49
+ # obj = Scoutui::Base::QBrowser.getObject(@drv, loc, Scoutui::Commands::Utils.instance.getTimeout)
50
+ obj = Scoutui::Base::QBrowser.findElement(@drv,
51
+ _loc,
52
+ Scoutui::Commands::Utils.instance.getFrameSearch(),
53
+ Scoutui::Commands::Utils.instance.getTimeout)
54
+
46
55
  _rc = _highlight(obj, e)
47
56
 
48
57
  rc &&= _rc
@@ -57,13 +66,9 @@ module Scoutui::Commands
57
66
  Scoutui::Logger::LogMgr.instance.warn "Backtrace:\n\t#{ex.backtrace.join("\n\t")}"
58
67
  end
59
68
 
60
-
61
69
  setResult(rc)
62
70
  end
63
71
 
64
-
65
-
66
72
  end
67
73
 
68
-
69
74
  end
@@ -40,7 +40,7 @@ module Scoutui::Commands
40
40
 
41
41
  end
42
42
 
43
- def execute(drv=nil)
43
+ def execute(drv=nil, _notUsed=nil)
44
44
  @drv=drv if !drv.nil?
45
45
 
46
46
  _isKb=false
@@ -68,8 +68,11 @@ module Scoutui::Commands
68
68
  obj = Scoutui::Base::QBrowser.findElement(@drv, _xpath, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
69
69
 
70
70
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " type(#{_val})"
71
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " tag : #{obj.tag_name}"
71
72
 
72
- if !obj.nil? && !obj.attribute('type').downcase.match(/(text|textarea|password|email)/).nil?
73
+ if !obj.nil? &&
74
+ (obj.tag_name.downcase=='body' ||
75
+ !obj.attribute('type').downcase.match(/(text|textarea|password|email)/).nil? )
73
76
 
74
77
  # Refactor in qbrowser
75
78
 
@@ -87,19 +90,21 @@ module Scoutui::Commands
87
90
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " send_keys(#{_val})"
88
91
 
89
92
  if isDisplayed
90
- if _val.match(/__DOWN__/)
93
+ if _val.match(/^\s*__DOWN__\s*$/)
91
94
  obj.send_keys(:arrow_down)
92
- elsif _val.match(/__TAB__/)
95
+ elsif _val.match(/^\s*__TAB__\s*$/)
93
96
  obj.send_keys(:tab)
97
+ elsif _val.match(/^\s*__CLEAR__\s*$/)
98
+ obj.clear
99
+ elsif _val.match(/^\s*__ENTER__\s*$/)
100
+ obj.send_keys("")
101
+ @drv.action.send_keys(:enter).perform
94
102
  else
95
-
96
103
  _uservars = _val.scan(/\$\{(.*?)\}/)
97
104
 
98
-
99
105
  _v2 = _val
100
106
  for i in 0 .. (_uservars.size - 1)
101
107
 
102
-
103
108
  _t = Scoutui::Base::UserVars.instance.get(_uservars[i][0])
104
109
  puts __FILE__ + (__LINE__).to_s + " translate(#{_uservars[i][0]}) => #{_t}"
105
110
 
@@ -142,9 +147,28 @@ module Scoutui::Commands
142
147
  end
143
148
  end
144
149
 
145
- # _text_to_type.gsub!(/__DATE__/, Time.now().to_s)
146
150
 
151
+ puts __FILE__ + (__LINE__).to_s + " Text to type : #{_text_to_type}"
147
152
  obj.send_keys(_text_to_type)
153
+
154
+ if !obj.nil? && false
155
+ arr=_text_to_type.split(/__ENTER__/)
156
+
157
+ i=0
158
+ arr.each do |_t|
159
+ # puts __FILE__ + (__LINE__).to_s + " => #{_t}"; STDIN.gets;
160
+ if i > 0
161
+ obj.send_keys("")
162
+ @drv.action.send_keys(:enter).perform
163
+ puts __FILE__ + (__LINE__).to_s + " ENTER"; STDIN.gets()
164
+ obj.send_keys("<ENTER>")
165
+ end
166
+
167
+ obj.send_keys(_t)
168
+ i+1
169
+ end
170
+ end
171
+
148
172
  end
149
173
 
150
174
 
@@ -3,7 +3,7 @@ module Scoutui::Commands
3
3
  class UpdateUrl < Command
4
4
 
5
5
 
6
- def execute(drv)
6
+ def execute(drv, _e=nil)
7
7
  @drv=drv if !drv.nil?
8
8
 
9
9
  _req = Scoutui::Utils::TestUtils.instance.getReq()
@@ -101,8 +101,11 @@ module Scoutui::Commands
101
101
 
102
102
  end
103
103
 
104
+ def execute(_drv, e=nil)
105
+ _execute(drv)
106
+ end
104
107
 
105
- def execute(drv)
108
+ def _execute(drv)
106
109
  @drv=drv if !drv.nil?
107
110
  _e=getLocator()
108
111
 
@@ -12,6 +12,7 @@ module Scoutui::Logger
12
12
 
13
13
  attr_accessor :root
14
14
  attr_accessor :commands
15
+ attr_accessor :benchmarks
15
16
 
16
17
  def initialize
17
18
 
@@ -40,6 +41,14 @@ module Scoutui::Logger
40
41
  )
41
42
  @commands.level = :debug
42
43
 
44
+
45
+ @benchmarks = Logging.logger['Benchmarks']
46
+ @benchmarks.add_appenders(
47
+ Logging.appenders.stdout,
48
+ Logging.appenders.file('benchmarks.log')
49
+ )
50
+ @benchmarks.level = :info
51
+
43
52
  #Logging.logger.root.level = :warn
44
53
  end
45
54
 
@@ -83,6 +92,14 @@ module Scoutui::Logger
83
92
  end
84
93
 
85
94
 
95
+ def benchmark
96
+ @benchmarks
97
+ end
98
+ def benchmarks
99
+ @benchmarks
100
+ end
101
+
102
+
86
103
  def log(level, txt)
87
104
 
88
105
  if level.match(/info/i)
@@ -1,3 +1,3 @@
1
1
  module Scoutui
2
- VERSION = "2.0.3.21.pre"
2
+ VERSION = "2.0.3.22.pre"
3
3
  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.3.21.pre
4
+ version: 2.0.3.22.pre
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-07-08 00:00:00.000000000 Z
11
+ date: 2016-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -183,6 +183,8 @@ files:
183
183
  - bin/console
184
184
  - bin/scoutui_driver.rb
185
185
  - bin/setup
186
+ - examples/benchmark/ex.rb
187
+ - examples/benchmark/ex_benchmark.rb
186
188
  - examples/capabilities/win10.chrome46.json
187
189
  - examples/carmax/appmodel/main.nav.json
188
190
  - examples/carmax/appmodel/search_results.json
@@ -219,6 +221,8 @@ files:
219
221
  - examples/ex2/tests/test-example2.sh
220
222
  - examples/ex2/tests/test-example3.sauce.sh
221
223
  - examples/ex2/tests/test-example3.sh
224
+ - examples/ex6/appmodel/model.json
225
+ - examples/ex6/tests/test.sh
222
226
  - examples/eyes/diff.rb
223
227
  - examples/eyes/ex2.rb
224
228
  - examples/eyes_results/response.json