Class: Maze::Hooks::BrowserHooks

Inherits:
InternalHooks show all
Defined in:
lib/maze/hooks/browser_hooks.rb

Overview

Hooks for Browser mode use

Instance Method Summary collapse

Methods inherited from InternalHooks

#after, #before, #pre_complete

Instance Method Details

#after_allObject



14
15
16
17
18
19
20
# File 'lib/maze/hooks/browser_hooks.rb', line 14

def after_all
  @client&.log_run_outro
rescue => error
  # Notify and re-raise for Cucumber to handle
  Bugsnag.notify error
  raise
end

#at_exitObject



22
23
24
# File 'lib/maze/hooks/browser_hooks.rb', line 22

def at_exit
  @client&.stop_session
end

#before_allObject



6
7
8
9
10
11
12
# File 'lib/maze/hooks/browser_hooks.rb', line 6

def before_all
  @client = Maze::Client::Selenium.start
rescue => error
  # Notify and re-raise for Cucumber to handle
  Bugsnag.notify error
  raise
end