scoutui 2.0.3.41.pre → 2.0.3.42.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: ac5746f66a5dc3d162f95bb123752a2ccde67780
4
- data.tar.gz: d1c901a73b3536cee603390cc2589d479815eef2
3
+ metadata.gz: 8ee09db76c41ef6b77f44a13642927e0ec73cd1b
4
+ data.tar.gz: da58678fca9727811647d3cc8d49c8714fd0f7c1
5
5
  SHA512:
6
- metadata.gz: 2d4e34121dcc3c9f71a488e798873e7a8b1d86cc0dd13152c25db9b92f9ef3bdb3a1c56c98c52dde991ff1520bd03884d8c9b836388f3ec7a12bf0c6399c439d
7
- data.tar.gz: 31c3927913965b23fa6e70156b51efd8edef9640f44094502380d1c0c088141f31cd1361e8ab9ebdbbe629d1d682e5b8f1ccf34bab7de55c44f84ec8dde332a1
6
+ metadata.gz: fbd59aefcd9addd80132f52bcb507f16f63c4fa5ca8720e97223b1578b219c1df4ac1c244e048d3792f56a5eea854e7c7de023bbedf40bca17b41ab9f56ec5fc
7
+ data.tar.gz: 454e491830517d735ab26b5c2198d79017cf4dbcaf3c84cb645a050be682d2ae9a5a481ddb376278b602e190d038ca80a1f7b40ce24cdc2d9dc9f719688d2c36
@@ -194,6 +194,11 @@ module Scoutui::Commands
194
194
  _c = Scoutui::Commands::VerifyElement.new(_action)
195
195
  _c.run(driver: my_driver)
196
196
 
197
+ elsif Scoutui::Commands::Utils.instance.isSleep?(_action)
198
+ _cmd='Sleep'
199
+ _c = Scoutui::Commands::Sleep.new(_action)
200
+ _c.run(driver: my_driver)
201
+
197
202
  elsif Scoutui::Commands::Utils.instance.isType?(_action)
198
203
  _cmd='Type'
199
204
  _c = Scoutui::Commands::Type.new(_action)
@@ -0,0 +1,39 @@
1
+
2
+ module Scoutui::Commands
3
+
4
+ class Sleep < Command
5
+
6
+
7
+ def execute(drv=nil, e=nil)
8
+ rc=false
9
+ _req = Scoutui::Utils::TestUtils.instance.getReq()
10
+
11
+ Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Sleep.execute(#{@cmd})"
12
+
13
+ begin
14
+
15
+ s=nil
16
+
17
+ if @cmd.match(/sleep\s*\((.*)\)/)
18
+ s = @cmd.match(/sleep\s*\((.*)\)/)[1].to_s.strip
19
+ end
20
+
21
+ msec = s.to_f
22
+
23
+ puts __FILE__ + (__LINE__).to_s + " start sleep: #{Time.now}"
24
+ sleep msec
25
+ puts __FILE__ + (__LINE__).to_s + " end sleep: #{Time.now}"
26
+
27
+ rc=true
28
+
29
+ rescue => ex
30
+ Scoutui::Logger::LogMgr.instance.warn __FILE__ + (__LINE__).to_s + " Error during processing: #{$!}"
31
+ Scoutui::Logger::LogMgr.instance.warn "Backtrace:\n\t#{ex.backtrace.join("\n\t")}"
32
+ end
33
+
34
+ setResult(rc)
35
+ end
36
+
37
+ end
38
+
39
+ end
@@ -32,6 +32,7 @@ module Scoutui::Commands
32
32
  'navigate',
33
33
  'select',
34
34
  'select_window',
35
+ 'sleep',
35
36
  'uploadfiles',
36
37
  'verifyelt',
37
38
  'verifyelement',
@@ -300,6 +301,10 @@ module Scoutui::Commands
300
301
  !_action.nil? && _action.match(/^\s*select\s*\(/i)
301
302
  end
302
303
 
304
+ def isSleep?(_action)
305
+ !_action.nil? && _action.match(/^\s*sleep\s*\(\s*\d+\s*\)\s*$/i)
306
+ end
307
+
303
308
  def isUploadFiles?(_action)
304
309
  !_action.nil? && _action.match(/^\s*uploadfiles\s*$/i)
305
310
  end
@@ -354,6 +359,8 @@ module Scoutui::Commands
354
359
  @totalCommands['navigate']+=1
355
360
  elsif isSelectWindow?(cmd)
356
361
  @totalCommands['select_window']+=1
362
+ elsif isSleep?(cmd)
363
+ @totalCommands['sleep']+=1
357
364
  elsif isUploadFiles?(cmd)
358
365
  @totalCommands['uploadfiles']+=1
359
366
  else
@@ -1,3 +1,3 @@
1
1
  module Scoutui
2
- VERSION = "2.0.3.41.pre"
2
+ VERSION = "2.0.3.42.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.41.pre
4
+ version: 2.0.3.42.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Kim
@@ -291,6 +291,7 @@ files:
291
291
  - lib/scoutui/commands/pause.rb
292
292
  - lib/scoutui/commands/select_object.rb
293
293
  - lib/scoutui/commands/select_window.rb
294
+ - lib/scoutui/commands/sleep.rb
294
295
  - lib/scoutui/commands/strategy.rb
295
296
  - lib/scoutui/commands/submit_form.rb
296
297
  - lib/scoutui/commands/switch_frame.rb