scoutui 2.0.0 → 2.0.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.
- checksums.yaml +4 -4
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +154 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/scoutui_driver.rb +22 -0
- data/bin/setup +7 -0
- data/examples/ex1/commands.holidays.yml +45 -0
- data/examples/ex1/commands.yml +25 -0
- data/examples/ex1/test-example.sh +38 -0
- data/examples/ex1/test.config.json +16 -0
- data/examples/ex2/commands.yml +35 -0
- data/examples/ex2/page_model.json +28 -0
- data/examples/ex2/test-example.sh +39 -0
- data/examples/ex2/test.config.json +25 -0
- data/lib/scoutui.rb +8 -0
- data/lib/scoutui/appmodel/q_model.rb +82 -0
- data/lib/scoutui/base/assertions.rb +62 -0
- data/lib/scoutui/base/q_accounts.rb +52 -0
- data/lib/scoutui/base/q_applitools.rb +127 -0
- data/lib/scoutui/base/q_browser.rb +185 -0
- data/lib/scoutui/base/q_form.rb +261 -0
- data/lib/scoutui/base/test_scout.rb +120 -0
- data/lib/scoutui/base/test_settings.rb +109 -0
- data/lib/scoutui/base/user_vars.rb +108 -0
- data/lib/scoutui/base/visual_test_framework.rb +574 -0
- data/lib/scoutui/commands/click_object.rb +45 -0
- data/lib/scoutui/commands/command.rb +56 -0
- data/lib/scoutui/commands/commands.rb +133 -0
- data/lib/scoutui/commands/exists_alert.rb +54 -0
- data/lib/scoutui/commands/fill_form.rb +56 -0
- data/lib/scoutui/commands/jsalert/action_jsalert.rb +58 -0
- data/lib/scoutui/commands/mouse_over.rb +31 -0
- data/lib/scoutui/commands/pause.rb +26 -0
- data/lib/scoutui/commands/select_object.rb +54 -0
- data/lib/scoutui/commands/strategy.rb +202 -0
- data/lib/scoutui/commands/submit_form.rb +44 -0
- data/lib/scoutui/commands/type.rb +44 -0
- data/lib/scoutui/commands/update_url.rb +45 -0
- data/lib/scoutui/commands/utils.rb +128 -0
- data/lib/scoutui/commands/verify_element.rb +198 -0
- data/lib/scoutui/commands/verify_form.rb +26 -0
- data/lib/scoutui/eyes/eye_factory.rb +76 -0
- data/lib/scoutui/eyes/eye_scout.rb +239 -0
- data/lib/scoutui/logger/log_mgr.rb +105 -0
- data/lib/scoutui/navigator.rb +24 -0
- data/lib/scoutui/utils/utils.rb +352 -0
- data/lib/scoutui/version.rb +3 -0
- data/scoutui.gemspec +35 -0
- metadata +54 -2
- data/pkg/scoutui-2.0.0.gem +0 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
require_relative './commands'
|
2
|
+
|
3
|
+
module Scoutui::Commands
|
4
|
+
|
5
|
+
class ClickObject < Command
|
6
|
+
|
7
|
+
|
8
|
+
def execute(drv)
|
9
|
+
@drv=drv if !drv.nil?
|
10
|
+
|
11
|
+
_xpath = @cmd.match(/click\s*\((.*)\)/)[1].to_s.strip
|
12
|
+
Scoutui::Logger::LogMgr.instance.command.info __FILE__ + (__LINE__).to_s + " clickObject => #{_xpath}" if Scoutui::Utils::TestUtils.instance.isDebug?
|
13
|
+
|
14
|
+
_xpath = Scoutui::Base::UserVars.instance.get(_xpath)
|
15
|
+
|
16
|
+
Scoutui::Logger::LogMgr.instance.command.info __FILE__ + (__LINE__).to_s + " | translate : #{_xpath}" if Scoutui::Utils::TestUtils.instance.isDebug?
|
17
|
+
|
18
|
+
_clicked=false
|
19
|
+
|
20
|
+
begin
|
21
|
+
obj = Scoutui::Base::QBrowser.getObject(@drv, _xpath)
|
22
|
+
|
23
|
+
if obj
|
24
|
+
obj.click
|
25
|
+
_clicked=true
|
26
|
+
end
|
27
|
+
|
28
|
+
rescue
|
29
|
+
;
|
30
|
+
end
|
31
|
+
|
32
|
+
Scoutui::Logger::LogMgr.instance.asserts.info "Verify object to click exists #{_xpath} : #{obj.class.to_s} - #{!obj.nil?.to_s}"
|
33
|
+
Scoutui::Logger::LogMgr.instance.asserts.info "Verify clicked #{_xpath} - #{_clicked.to_s}"
|
34
|
+
|
35
|
+
Testmgr::TestReport.instance.getReq('UI').testcase('click').add(!obj.nil?, "Verify object to click exists #{_xpath} : #{obj.class.to_s}")
|
36
|
+
Testmgr::TestReport.instance.getReq('UI').testcase('click').add(_clicked, "Verify clicked #{_xpath}")
|
37
|
+
|
38
|
+
setResult(_clicked)
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
|
2
|
+
module Scoutui::Commands
|
3
|
+
|
4
|
+
class Command
|
5
|
+
attr_accessor :description
|
6
|
+
attr_accessor :drv
|
7
|
+
attr_accessor :cmd
|
8
|
+
attr_accessor :rc
|
9
|
+
attr_accessor :locator
|
10
|
+
attr_accessor :executed
|
11
|
+
attr_accessor :executed_result
|
12
|
+
|
13
|
+
def initialize(_cmd, _drv=nil)
|
14
|
+
Scoutui::Logger::LogMgr.instance.commands.debug __FILE__ + (__LINE__).to_s + " Command.init: #{_cmd.to_s}"
|
15
|
+
@cmd=_cmd
|
16
|
+
@rc=nil
|
17
|
+
@drv=_drv
|
18
|
+
@locator=nil
|
19
|
+
@executed=false
|
20
|
+
@executed_result=nil
|
21
|
+
end
|
22
|
+
|
23
|
+
def setResult(r)
|
24
|
+
Scoutui::Logger::LogMgr.instance.commands.debug " setResult(#{r.to_s})"
|
25
|
+
@executed=true
|
26
|
+
@executed_result=r
|
27
|
+
end
|
28
|
+
|
29
|
+
def executedResult
|
30
|
+
@executed_result
|
31
|
+
end
|
32
|
+
|
33
|
+
def wasExecuted?
|
34
|
+
@executed
|
35
|
+
end
|
36
|
+
|
37
|
+
def setLocator(_locator)
|
38
|
+
@locator=_locator
|
39
|
+
end
|
40
|
+
|
41
|
+
def getLocator()
|
42
|
+
@locator
|
43
|
+
end
|
44
|
+
|
45
|
+
def result
|
46
|
+
@rc
|
47
|
+
end
|
48
|
+
|
49
|
+
def execute(_drv=nil, _dut=nil)
|
50
|
+
raise NotImplementedError
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
end
|
@@ -0,0 +1,133 @@
|
|
1
|
+
require_relative('./command')
|
2
|
+
|
3
|
+
module Scoutui::Commands
|
4
|
+
|
5
|
+
STEP_KEY='page'
|
6
|
+
|
7
|
+
|
8
|
+
def self.processCommands(commandList, my_driver)
|
9
|
+
|
10
|
+
commandList.each do |cmd|
|
11
|
+
begin
|
12
|
+
rc=processCommand(cmd[:command], cmd[:e], my_driver)
|
13
|
+
rescue => ex
|
14
|
+
Scoutui::Logger::LogMgr.instance.debug "Error during processing: #{$!}"
|
15
|
+
Scoutui::Logger::LogMgr.instance.debug "Backtrace:\n\t#{e.backtrace.join("\n\t")}"
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.processCommand(_action, e, my_driver)
|
23
|
+
Scoutui::Logger::LogMgr.instance.commands.debug __FILE__ + (__LINE__).to_s + " === Process ACTION : #{_action} ===" if Scoutui::Utils::TestUtils.instance.isDebug?
|
24
|
+
|
25
|
+
_aborted=false
|
26
|
+
_cmd=nil
|
27
|
+
_totalWindows = my_driver.window_handles.length
|
28
|
+
|
29
|
+
rc=true
|
30
|
+
_req = Scoutui::Utils::TestUtils.instance.getReq()
|
31
|
+
|
32
|
+
begin
|
33
|
+
|
34
|
+
_c=nil
|
35
|
+
|
36
|
+
if Scoutui::Commands::Utils.instance.isPause?(_action)
|
37
|
+
_cmd='pause'
|
38
|
+
_c = Scoutui::Commands::Pause.new(nil)
|
39
|
+
_c.execute(e);
|
40
|
+
|
41
|
+
elsif Scoutui::Commands::Utils.instance.isClick?(_action)
|
42
|
+
_cmd='Click'
|
43
|
+
_c = Scoutui::Commands::ClickObject.new(_action)
|
44
|
+
_c.execute(my_driver)
|
45
|
+
|
46
|
+
elsif Scoutui::Commands::Utils.instance.isExistsAlert?(_action)
|
47
|
+
_cmd='ExistsAlert'
|
48
|
+
_c = Scoutui::Commands::JsAlert::ExistsAlert.new(_action)
|
49
|
+
rc=_c.execute(my_driver)
|
50
|
+
|
51
|
+
elsif Scoutui::Commands::Utils.instance.isGetAlert?(_action)
|
52
|
+
_cmd='GetAlert'
|
53
|
+
_c = Scoutui::Commands::ExistsAlert.new(_action)
|
54
|
+
rc=_c.execute(my_driver)
|
55
|
+
|
56
|
+
elsif Scoutui::Commands::Utils.instance.isMouseOver?(_action)
|
57
|
+
_cmd='MouseOver'
|
58
|
+
_c = Scoutui::Commands::MouseOver.new(_action)
|
59
|
+
_c.execute(my_driver)
|
60
|
+
|
61
|
+
elsif Scoutui::Commands::Utils.instance.isSelect?(_action)
|
62
|
+
_cmd='Select'
|
63
|
+
_c = Scoutui::Commands::SelectObject.new(_action)
|
64
|
+
_c.execute(my_driver)
|
65
|
+
|
66
|
+
elsif Scoutui::Commands::Utils.instance.isFillForm?(_action)
|
67
|
+
|
68
|
+
_cmd='FillForm'
|
69
|
+
_c = Scoutui::Commands::FillForm.new(_action)
|
70
|
+
|
71
|
+
_rc=false
|
72
|
+
begin
|
73
|
+
_form = _action.match(/fillform\((.*)\s*\)/)[1].to_s
|
74
|
+
# _dut = _action.match(/fillform\(.*,\s*(.*)\)/)[1].to_s
|
75
|
+
|
76
|
+
dut = e[STEP_KEY]['dut']
|
77
|
+
|
78
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " DUT => #{dut}"
|
79
|
+
_f = Scoutui::Utils::TestUtils.instance.getForm(_form)
|
80
|
+
_f.dump()
|
81
|
+
_f.verifyForm(my_driver)
|
82
|
+
_f.fillForm(my_driver, dut)
|
83
|
+
_rc=true
|
84
|
+
rescue
|
85
|
+
;
|
86
|
+
end
|
87
|
+
|
88
|
+
_c.setResult(_rc)
|
89
|
+
|
90
|
+
elsif Scoutui::Commands::Utils.instance.isSubmitForm?(_action)
|
91
|
+
_cmd='SubmitForm'
|
92
|
+
_c = Scoutui::Commands::SubmitForm.new(_action)
|
93
|
+
_c.execute(my_driver)
|
94
|
+
|
95
|
+
|
96
|
+
elsif Scoutui::Commands::Utils.instance.isNavigate?(_action)
|
97
|
+
_cmd='Navigate'
|
98
|
+
_c = Scoutui::Commands::UpdateUrl.new(_action)
|
99
|
+
_c.execute(my_driver)
|
100
|
+
|
101
|
+
elsif Scoutui::Commands::Utils.instance.isVerifyElt?(_action)
|
102
|
+
_cmd='VerifyElement'
|
103
|
+
|
104
|
+
_c = Scoutui::Commands::VerifyElement.new(_action)
|
105
|
+
_c.execute(my_driver)
|
106
|
+
|
107
|
+
elsif Scoutui::Commands::Utils.instance.isType?(_action)
|
108
|
+
_cmd='Type'
|
109
|
+
_c = Scoutui::Commands::Type.new(_action)
|
110
|
+
_c.execute(my_driver)
|
111
|
+
else
|
112
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Unknown command : #{_action}"
|
113
|
+
rc=false
|
114
|
+
end
|
115
|
+
|
116
|
+
rescue => e
|
117
|
+
Scoutui::Logger::LogMgr.instance.debug "Error during processing: #{$!}"
|
118
|
+
Scoutui::Logger::LogMgr.instance.debug "Backtrace:\n\t#{e.backtrace.join("\n\t")}"
|
119
|
+
puts "Backtrace:\n\t#{e.backtrace.join("\n\t")}"
|
120
|
+
_aborted=true
|
121
|
+
rc=false
|
122
|
+
end
|
123
|
+
|
124
|
+
if my_driver.window_handles.length > _totalWindows
|
125
|
+
Scoutui::Logger::LogMgr.instance.info " New Window generated"
|
126
|
+
end
|
127
|
+
|
128
|
+
Testmgr::TestReport.instance.getReq(_req).get_child(_cmd.downcase).add(!_aborted, "Verify command did not abort")
|
129
|
+
_c
|
130
|
+
end
|
131
|
+
|
132
|
+
|
133
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
module Scoutui::Commands
|
4
|
+
|
5
|
+
class ExistsAlert < Command
|
6
|
+
|
7
|
+
|
8
|
+
def execute(drv=nil)
|
9
|
+
@drv=drv if !drv.nil?
|
10
|
+
|
11
|
+
_action = @cmd.match(/(get_*alert|clickjsconfirm|clickjsprompt|clickjsalert)\s*\((.*)\)/i)[2].to_s.strip
|
12
|
+
|
13
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " ExistsAlert(#{_action})" if Scoutui::Utils::TestUtils.instance.isDebug?
|
14
|
+
|
15
|
+
rc=false
|
16
|
+
|
17
|
+
alert=nil
|
18
|
+
|
19
|
+
begin
|
20
|
+
alert=@drv.switch_to.alert
|
21
|
+
|
22
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " | alert => #{alert.class.to_s}" if Scoutui::Utils::TestUtils.instance.isDebug?
|
23
|
+
|
24
|
+
if alert.is_a?(Selenium::WebDriver::Alert)
|
25
|
+
if _action.match(/accept/i)
|
26
|
+
alert.accept
|
27
|
+
elsif _action.match(/dismiss/i)
|
28
|
+
alert.dismiss
|
29
|
+
end
|
30
|
+
|
31
|
+
rc=true
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
rescue Selenium::WebDriver::Error::NoSuchAlertError
|
36
|
+
;
|
37
|
+
end
|
38
|
+
|
39
|
+
_req = Scoutui::Utils::TestUtils.instance.getReq()
|
40
|
+
|
41
|
+
Testmgr::TestReport.instance.getReq(_req).testcase(_action).add(!alert.nil?, "Verify alert exists")
|
42
|
+
Testmgr::TestReport.instance.getReq(_req).testcase(_action).add(rc, "Verify processed alert")
|
43
|
+
|
44
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " ExistsAlert() => #{rc.to_s}" if Scoutui::Utils::TestUtils.instance.isDebug?
|
45
|
+
rc
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require_relative './commands'
|
2
|
+
|
3
|
+
module Scoutui::Commands
|
4
|
+
|
5
|
+
class FillForm < Command
|
6
|
+
attr_accessor :form
|
7
|
+
attr_accessor :formLocator
|
8
|
+
attr_accessor :dut
|
9
|
+
|
10
|
+
def initialize(_cmd)
|
11
|
+
super(_cmd)
|
12
|
+
|
13
|
+
@dut=nil
|
14
|
+
|
15
|
+
Scoutui::Logger::LogMgr.instance.commands.debug __FILE__ + (__LINE__).to_s + " form => #{@cmd}"
|
16
|
+
@formLocator = @cmd.match(/fillform\((.*)\s*\)/)[1].to_s
|
17
|
+
@form = Scoutui::Utils::TestUtils.instance.getForm(@formLocator)
|
18
|
+
Scoutui::Logger::LogMgr.instance.commands.debug __FILE__ + (__LINE__).to_s + " Form => #{@form}"
|
19
|
+
@form.dump()
|
20
|
+
end
|
21
|
+
|
22
|
+
def fill(drv, dut)
|
23
|
+
@drv=drv if !drv.nil?
|
24
|
+
|
25
|
+
@form.fillForm(@drv, dut)
|
26
|
+
end
|
27
|
+
|
28
|
+
def execute(drv=nil)
|
29
|
+
@drv=drv if !drv.nil?
|
30
|
+
|
31
|
+
|
32
|
+
#_form = @cmd.match(/fillform\((.*)\s*\)/)[1].to_s
|
33
|
+
# _dut = _action.match(/fillform\(.*,\s*(.*)\)/)[1].to_s
|
34
|
+
|
35
|
+
# dut = e['page']['dut']
|
36
|
+
|
37
|
+
# Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " _dut => #{_dut}"
|
38
|
+
Scoutui::Logger::LogMgr.instance.commands.debug __FILE__ + (__LINE__).to_s + " DUT => #{@dut}"
|
39
|
+
_rc=false
|
40
|
+
begin
|
41
|
+
_f = Scoutui::Utils::TestUtils.instance.getForm(@formLocator)
|
42
|
+
_f.dump()
|
43
|
+
_f.verifyForm(@drv)
|
44
|
+
_f.fillForm(@drv, dut)
|
45
|
+
_rc=true
|
46
|
+
rescue
|
47
|
+
;
|
48
|
+
end
|
49
|
+
|
50
|
+
setResult(_rc)
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'testmgr'
|
2
|
+
|
3
|
+
module Scoutui::Commands::JsAlert
|
4
|
+
|
5
|
+
class ExistsAlert < Scoutui::Commands::Command
|
6
|
+
|
7
|
+
|
8
|
+
def execute(drv=nil)
|
9
|
+
@drv=drv if !drv.nil?
|
10
|
+
|
11
|
+
_rc=nil
|
12
|
+
_alertExists=false
|
13
|
+
|
14
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " command => #{@cmd.to_s}"
|
15
|
+
|
16
|
+
_action=@cmd.match(/(exist[s]*_*alert|existAlert|existsAlert|existsJsAlert|existsJsConfirm|existsJsPrompt)\s*\((.*)\)/i)[2].to_s.strip
|
17
|
+
|
18
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " ExistsAlert(#{_action})" if Scoutui::Utils::TestUtils.instance.isDebug?
|
19
|
+
|
20
|
+
alert=nil
|
21
|
+
|
22
|
+
begin
|
23
|
+
alert=@drv.switch_to.alert
|
24
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " | alert => #{alert.class.to_s}" if Scoutui::Utils::TestUtils.instance.isDebug?
|
25
|
+
|
26
|
+
_alertExists = alert.is_a?(Selenium::WebDriver::Alert)
|
27
|
+
if _alertExists && !(_action.nil? && _action.empty?)
|
28
|
+
_r = Regexp.new _action.to_s
|
29
|
+
|
30
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " _r => #{_r}"
|
31
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " _t => #{alert.text.to_s}"
|
32
|
+
_rc=!alert.text.to_s.match(_r).nil?
|
33
|
+
end
|
34
|
+
|
35
|
+
rescue Selenium::WebDriver::Error::NoSuchAlertError
|
36
|
+
alert=nil
|
37
|
+
end
|
38
|
+
|
39
|
+
Testmgr::TestReport.instance.getReq('UI').testcase('expectJsAlert').add(_alertExists, "Verify JsAlert is present")
|
40
|
+
|
41
|
+
if !(_action.nil? && _action.empty?)
|
42
|
+
Testmgr::TestReport.instance.getReq('UI').get_child('expectJsAlert').add(_rc, "Verify JsAlert contains text #{_action}")
|
43
|
+
|
44
|
+
|
45
|
+
setResult(_rc)
|
46
|
+
end
|
47
|
+
|
48
|
+
Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " ExistsAlert() => #{alert.class.to_s} rc:#{_rc.to_s}" if Scoutui::Utils::TestUtils.instance.isDebug?
|
49
|
+
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
module Scoutui::Commands
|
3
|
+
|
4
|
+
class MouseOver < Command
|
5
|
+
|
6
|
+
def execute(drv=nil)
|
7
|
+
_rc=false
|
8
|
+
_req = Scoutui::Utils::TestUtils.instance.getReq()
|
9
|
+
|
10
|
+
@drv=drv if !drv.nil?
|
11
|
+
|
12
|
+
begin
|
13
|
+
_xpath = @cmd.match(/mouseover\s*\((.*)\)/)[1].to_s.strip
|
14
|
+
obj = Scoutui::Base::QBrowser.getObject(@drv, _xpath)
|
15
|
+
@drv.action.move_to(obj).perform
|
16
|
+
_rc=true
|
17
|
+
rescue
|
18
|
+
;
|
19
|
+
end
|
20
|
+
|
21
|
+
Testmgr::TestReport.instance.getReq(_req).testcase('mouseover').add(!obj.nil?, "Verify object #{_xpath} to mouseover exists : #{obj.class.to_s}")
|
22
|
+
Testmgr::TestReport.instance.getReq(_req).testcase('mousseover').add(_rc, "Verify mouseover #{_rc}")
|
23
|
+
setResult(_rc)
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
module Scoutui::Commands
|
4
|
+
|
5
|
+
class Pause < Command
|
6
|
+
|
7
|
+
def execute(e=nil)
|
8
|
+
rc=true
|
9
|
+
h=""
|
10
|
+
begin
|
11
|
+
if e.is_a?(Hash) && e.has_key?('page')
|
12
|
+
h=e['page']['name'].to_s
|
13
|
+
end
|
14
|
+
puts "====== PAUSE - HIT ENTER #{h} ========="
|
15
|
+
gets()
|
16
|
+
rescue => ex
|
17
|
+
puts "Error during processing: #{$!}"
|
18
|
+
puts "Backtrace:\n\t#{ex.backtrace.join("\n\t")}"
|
19
|
+
rc=false
|
20
|
+
end
|
21
|
+
setResult(rc)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
end
|