scoutui 2.0.3.8.pre → 2.0.3.9.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: 79994a0d4fd1486ba1b69e52c53818b71ea2e644
4
- data.tar.gz: aa2f3f32e50bceef913ab4a4dcf9636a00f99a15
3
+ metadata.gz: 85f74f61ddde9a9f3780649cf4cb0a62025b50fb
4
+ data.tar.gz: e2c3e2c54903c23c6ce96052ed1557836f63e4a7
5
5
  SHA512:
6
- metadata.gz: b44ef15a132347af422c4b6305254bf95980d994a65fafef8ef77d7860e6418d97103b5eb9c7d4e2d53f7ad175f3de51193795e6387e35a825a392a67a326e25
7
- data.tar.gz: 60ebca8ff2beeafe10e75912a02719c0180bfb6646c4058de1d317a93a892051d68d99f8ecf9bb38c1ce5fea786f6676b6c75ca5a98c140b91de5f40e2049bb5
6
+ metadata.gz: 323b77c4659a4bd93744b57af6d20a7ef14288e2f373aaab2ff90d351e570648e59578478d9c5be44214eab20168dbf8984cf05e6c3d437d56b34177c042a3ef
7
+ data.tar.gz: 0edc3b3ded7801b002d2d0c176e1eba8d3cf12f8737b0160f4faf5ee2a9b94668c29bfcae447950515a8be22885522cd77473f20dc0ca453a14561af454e3ba5
@@ -50,7 +50,8 @@ module Scoutui::ApplicationModel
50
50
  def getPageElement(s)
51
51
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " getPageElement(#{s})"
52
52
 
53
- if s.match(/^\s*\//) || s.match(/^\s*css\s*=/i)
53
+ if s.match(/^\s*\//) || s.match(/^\s*css\s*=/i) || s.match(/^\s*#/)
54
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " getPageElement(#{s} return nil"
54
55
  return nil
55
56
  end
56
57
 
@@ -59,6 +60,8 @@ module Scoutui::ApplicationModel
59
60
  nodes = s.split(/\./)
60
61
 
61
62
  nodes.each { |elt|
63
+
64
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " process #{elt}"
62
65
  getter = elt.split(/\(/)[0]
63
66
  _obj = elt.match(/\((.*)\)/)[1]
64
67
 
@@ -173,7 +173,9 @@ module Scoutui::Base
173
173
  if !frames.nil?
174
174
  puts __FILE__ + (__LINE__).to_s + " [self.switch_frame]: frames => #{frames}";
175
175
 
176
- frame_list=frames.split(/(frame\(.*\))\.(?=[\w])/)
176
+ # frame_list=frames.split(/(frame\(.*\))\.(?=[\w])/)
177
+ frame_list=frames.split(/\.(?=frame)/)
178
+
177
179
 
178
180
  frame_list.each do |_f|
179
181
  puts __FILE__ + (__LINE__).to_s + " processing #{_f}"
@@ -123,6 +123,12 @@ module Scoutui::Base
123
123
 
124
124
  def getUserVar(_k)
125
125
  rc=nil
126
+
127
+ if _k=='${LOC}' || user_var=='${__LOC__}'
128
+ _k = :lang
129
+ end
130
+
131
+
126
132
  if @userVars.has_key?(_k)
127
133
  rc=@userVars[_k]
128
134
  end
@@ -385,7 +385,31 @@ module Scoutui::Base
385
385
 
386
386
  if _v.has_key?('visible_when')
387
387
 
388
- if _v['visible_when'].match(/always/i)
388
+ if _v['visible_when'].match(/value\((\$\{.*\})\)=(.*)/)
389
+
390
+ user_var = _v['visible_when'].match(/value\((\$\{.*\})\)=(.*)/)[1]
391
+ expected_v = _v['visible_when'].match(/value\((\$\{.*\})\)=(.*)/)[2]
392
+
393
+ _uservar_val = Scoutui::Base::UserVars.instance.getVar(user_var)
394
+
395
+
396
+
397
+ puts __FILE__ + (__LINE__).to_s + " _uservar_val : #{_uservar_val}"
398
+ puts __FILE__ + (__LINE__).to_s + " Assert user variable - #{user_var} matches #{expected_v} => #{_uservar_val.match(expected_v)}"
399
+
400
+
401
+ if _uservar_val.match(expected_v)
402
+ # 5150
403
+
404
+ Scoutui::Logger::LogMgr.instance.asserts.info __FILE__ + (__LINE__).to_s + "Verify conditional assertion #{_k} - #{!_obj.nil?}"
405
+ Testmgr::TestReport.instance.getReq(_req).get_child('visible_when').add(!_obj.nil?, "Verify assertion #{_k} - #{_locator} visible when #{_v['visible_when']}")
406
+ else
407
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Conditional Assertion skipped - trigger #{_v['visible_when']} is false"
408
+ end
409
+
410
+
411
+
412
+ elsif _v['visible_when'].match(/always/i)
389
413
  Scoutui::Logger::LogMgr.instance.asserts.info __FILE__ + (__LINE__).to_s + " Verify assertion #{_k} - #{_locator} visible - #{!_obj.nil?.to_s}"
390
414
  Testmgr::TestReport.instance.getReq(_req).get_child('visible_when').add(!_obj.nil?, "Verify assertion #{_k} - #{_locator} visible")
391
415
  elsif Scoutui::Base::Assertions.instance.visible_when_never(_k, _v, _obj, _req)
@@ -6,6 +6,8 @@ module Scoutui::Commands
6
6
 
7
7
  def _whenClicked(page_elt)
8
8
 
9
+ return if page_elt.nil?
10
+
9
11
  if page_elt.is_a?(Hash) && page_elt.has_key?('when_clicked')
10
12
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Verify #{page_elt['when_clicked']}"
11
13
 
@@ -160,6 +160,7 @@ module Scoutui::Commands
160
160
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Ruby bindings workaround for Edge"
161
161
  caps={}
162
162
  else
163
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " edge()"
163
164
  caps = Selenium::WebDriver::Remote::Capabilities.edge()
164
165
  end
165
166
 
@@ -48,11 +48,6 @@ module Scoutui::Commands
48
48
  _req = Scoutui::Utils::TestUtils.instance.getReq()
49
49
 
50
50
  begin
51
- # _xpath = @cmd.match(/type[\!]*\((.*),\s*/)[1].to_s
52
- # _val = @cmd.match(/type[\!]*\(.*,\s*(.*)\)/)[1].to_s
53
-
54
-
55
-
56
51
 
57
52
  if @cmd.strip.match(/^\s*type\s*\(\s*__TAB__\s*\)\s*$/)
58
53
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " HIT TAB key"
@@ -68,7 +63,6 @@ module Scoutui::Commands
68
63
 
69
64
  Scoutui::Logger::LogMgr.instance.commands.debug __FILE__ + (__LINE__).to_s + "Process TYPE #{_val} into #{_xpath}"
70
65
 
71
- # 5150 obj = Scoutui::Base::QBrowser.getObject(@drv, _xpath, Scoutui::Commands::Utils.instance.getTimeout)
72
66
  obj = Scoutui::Base::QBrowser.findElement(@drv, _xpath, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
73
67
 
74
68
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " type(#{_val})"
@@ -143,15 +143,28 @@ module Scoutui::Eyes
143
143
  end
144
144
 
145
145
  def check_window(tag, region=nil)
146
- Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " check_window(#{tag.to_s})" if Scoutui::Utils::TestUtils.instance.isDebug?
146
+ Scoutui::Logger::LogMgr.instance.info __FILE__ + (__LINE__).to_s + " check_window(#{tag.to_s}, #{region})" if Scoutui::Utils::TestUtils.instance.isDebug?
147
147
 
148
148
  return if !Scoutui::Utils::TestUtils.instance.eyesEnabled?
149
149
 
150
150
  if region.nil?
151
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " check_window(#{tag.to_s})"
151
152
  eyes().check_window(tag.to_s)
152
153
  else
154
+
155
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " check_window.fullshot"
153
156
  f = eyes().force_fullpage_screenshot
154
- eyes().check_region(:xpath, region, tag)
157
+
158
+ if region.match(/^css\s*\=\s*/)
159
+ _css = region.gsub(/^css\s*\=\s*/,"").to_s
160
+
161
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " snapshot(region.css) : #{_css}"
162
+ eyes().check_region(:css, _css, tag)
163
+ else
164
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "check_window(:xpath, #{region}, #{tag})"
165
+ eyes().check_region(:xpath, region, tag)
166
+ end
167
+
155
168
  eyes().force_fullpage_screenshot = f
156
169
  end
157
170
 
@@ -193,6 +206,7 @@ module Scoutui::Eyes
193
206
  viewport_size = Scoutui::Base::UserVars.instance.getViewPort()
194
207
 
195
208
  puts __FILE__ + (__LINE__).to_s + " browserType => #{browserType}"
209
+ puts __FILE__ + (__LINE__).to_s + " viewport : #{viewport_size}"
196
210
 
197
211
 
198
212
  Testmgr::TestReport.instance.setDescription('ScoutUI Test')
@@ -238,7 +252,7 @@ module Scoutui::Eyes
238
252
  end
239
253
 
240
254
  rescue => ex
241
- Scoutui::Logger::LogMgr.instance.info ex.backtrace
255
+ Scoutui::Logger::LogMgr.instance.warn ex.backtrace
242
256
  end
243
257
 
244
258
  end
@@ -105,7 +105,13 @@ module Scoutui::Utils
105
105
  end
106
106
 
107
107
  def getPageElement(s)
108
- @app_model.getPageElement(s)
108
+ rc=nil
109
+
110
+ if !@app_model.nil?
111
+ rc=@app_model.getPageElement(s)
112
+ end
113
+
114
+ rc
109
115
  end
110
116
 
111
117
  def getAppModel()
@@ -1,3 +1,3 @@
1
1
  module Scoutui
2
- VERSION = "2.0.3.8.pre"
2
+ VERSION = "2.0.3.9.pre"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scoutui
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3.8.pre
4
+ version: 2.0.3.9.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Kim
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-05-20 00:00:00.000000000 Z
12
+ date: 2016-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler