Module: TestSteps
- Defined in:
- lib/utils/test_steps.rb,
lib/functions/handlers/login.rb,
lib/functions/handlers/ipause.rb,
lib/functions/handlers/open_url.rb,
lib/functions/handlers/check_box.rb,
lib/functions/handlers/check_url.rb,
lib/functions/handlers/ping_test.rb,
lib/functions/handlers/check_logs.rb,
lib/functions/handlers/base_handler.rb,
lib/functions/handlers/browser_back.rb,
lib/functions/handlers/browser_quit.rb,
lib/functions/handlers/click_button.rb,
lib/functions/handlers/radio_button.rb,
lib/functions/handlers/capture_alert.rb,
lib/functions/handlers/check_boxdata.rb,
lib/functions/handlers/write_box_data.rb,
lib/functions/handlers/browser_forward.rb,
lib/functions/handlers/browser_refresh.rb,
lib/functions/handlers/open_portal_url.rb,
lib/functions/handlers/select_dropdown.rb,
lib/functions/handlers/write_to_editor.rb,
lib/functions/handlers/check_screendata.rb,
lib/functions/handlers/send_special_keys.rb,
lib/functions/handlers/check_browser_title.rb,
lib/functions/handlers/insert_value_config.rb,
lib/functions/handlers/handle_browser_window.rb,
lib/functions/handlers/execute_system_command.rb,
lib/functions/handlers/list_all_dropdowns_values.rb
Overview
require ‘./taf_config.rb’
Defined Under Namespace
Modules: Handlers
Class Method Summary collapse
- .handlers ⇒ Object
-
.process_test_steps(test_file_name, teststepindex, step_attributes) ⇒ Object
process the test step data by matching the test step functions and processing the associated data accordingly.
Class Method Details
.handlers ⇒ Object
13 14 15 |
# File 'lib/utils/test_steps.rb', line 13 def self.handlers @handlers ||= {} end |
.process_test_steps(test_file_name, teststepindex, step_attributes) ⇒ Object
process the test step data by matching the test step functions and processing the associated data accordingly
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/utils/test_steps.rb', line 19 def self.process_test_steps(test_file_name, teststepindex, step_attributes) # print the test step information Report.print_test_step_header(test_file_name, teststepindex) runtest = step_attributes[:skipTestCase] step_function = step_attributes[:testFunction] handler = handlers[step_function.to_s] if handler.respond_to?(:perform) func = handler.perform(step_attributes) if runtest == false Report.test_pass_fail(func, test_file_name, teststepindex) Report.check_failure_threshold(test_file_name, teststepindex) return true else Report.results.puts("\nUnable to match function: #{step_function}") puts "\nUnable to match function: #{step_function}" raise UnknownTestStep, "Unknown test step: #{step_function}" return false end end |