Class: Girbot::Step
- Inherits:
-
StepFoundation
- Object
- StepFoundation
- Girbot::Step
- Includes:
- WatirShortcuts
- Defined in:
- lib/girbot/steps/step.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from StepFoundation
Instance Method Summary collapse
Methods included from WatirShortcuts
#append_to_textfield, #browser, #click, #close, #exec_js, #fire_event, #goto, #maximize, #screenshot, #select_value, #text_in_textfield
Methods inherited from StepFoundation
#initialize, read, run, #take_whole_action, #validate_auth, #validate_browser_presence, #validate_card, #wait_for_sms
Constructor Details
This class inherits a constructor from Girbot::StepFoundation
Instance Method Details
#action(options) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/girbot/steps/step.rb', line 5 def action raise 'actions missing' if [:actions].nil? raise 'actions needs to be an array' if [:actions].class != Array [:actions].each do |action| key = action.keys.first raise 'missing action key' if key.nil? raise 'invalid action key' if !Girbot::WatirShortcuts.instance_methods.include? key.to_sym action[key] = [action[key]] if action[key].class != Array end [:actions].each do |action| key = action.keys.first send(key, *action[key]) end end |