lib/bauxite/core/context.rb in bauxite-0.6.12 vs lib/bauxite/core/context.rb in bauxite-0.6.13

- old
+ new

@@ -177,11 +177,11 @@ def start(actions = []) return unless actions.size > 0 begin actions.each do |action| begin - exec_action(action) + break if exec_action(action) == :break rescue StandardError => e print_error(e) raise unless @options[:debug] debug end @@ -324,11 +324,11 @@ @parser.parse(file) do |action, args, text, file, line| @variables['__DIR__'] = File.absolute_path(File.dirname(file)) @variables['__FILE__'] = file @variables['__LINE__'] = line - exec_parsed_action(action, args, true, text) + break if exec_parsed_action(action, args, true, text) == :break end @variables['__DIR__' ] = current_dir @variables['__FILE__'] = current_file @variables['__LINE__'] = current_line @@ -357,10 +357,14 @@ end else ret = exec_action_object(action) end - ret.call if ret.respond_to? :call # delayed actions (after log_cmd) + if ret.respond_to? :call # delayed actions (after log_cmd) + ret.call + else + ret + end rescue Selenium::WebDriver::Error::UnhandledAlertError raise Bauxite::Errors::AssertionError, "Unexpected modal present" end # Executes the given block retrying for at most <tt>${__TIMEOUT__}</tt> \ No newline at end of file