lib/bauxite/core/context.rb in bauxite-0.6.1 vs lib/bauxite/core/context.rb in bauxite-0.6.2
- old
+ new
@@ -220,11 +220,18 @@
#
# ctx.stop # => closes firefox
#
def stop
Context::wait if @options[:wait]
- @driver.quit
+ begin
+ @logger.finalize(self)
+ rescue StandardError => e
+ print_error(e)
+ raise
+ ensure
+ @driver.quit
+ end
end
# Finds an element by +selector+.
#
# The element found is yielded to the given +block+ (if any) and returned.
@@ -540,10 +547,11 @@
p e
puts e.backtrace
end
if capture and @options[:capture]
with_vars(e.variables) do
- exec_parsed_action('capture', [] , false)
+ exec_parsed_action('capture', [] , false)
+ e.variables['__CAPTURE__'] = @variables['__CAPTURE__']
end
end
end
# ======================================================================= #
\ No newline at end of file