Class: Scoutui::Commands::Pause
- Defined in:
- lib/scoutui/commands/pause.rb
Instance Attribute Summary
Attributes inherited from Command
#bm, #cmd, #description, #drv, #enableAssert, #executed, #executed_result, #locator, #rc, #stanza
Instance Method Summary collapse
Methods inherited from Command
#assert?, #disableAssert, #disableAsserts, #enableAsserts, #executedResult, #getLocator, #initialize, #passed?, #result, #run, #setBenchmark, #setLocator, #setResult, #wasExecuted?
Constructor Details
This class inherits a constructor from Scoutui::Commands::Command
Instance Method Details
#execute(e = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/scoutui/commands/pause.rb', line 7 def execute(e=nil) rc=true h="" begin if e.is_a?(Hash) if e.has_key?('page') h=e['page']['name'].to_s elsif e.has_key?('name') h=e['name'] end elsif e.is_a?(String) h=e end puts "====== PAUSE - HIT ENTER #{h} =========" STDIN.gets() rescue => ex puts "Error during processing: #{$!}" puts "Backtrace:\n\t#{ex.backtrace.join("\n\t")}" rc=false end setResult(rc) end |