From 310271a6d8e335e6eb5c2a536c7904abc2e5fd6b Mon Sep 17 00:00:00 2001 From: Alexey Lustin Date: Thu, 7 Jan 2016 23:08:30 +0300 Subject: [PATCH] quit the driver at cucumber exit * Add 2 standart cucumber hooks * close the driver process after the test sesion is ended --- features-skeleton/support/hooks.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/features-skeleton/support/hooks.rb b/features-skeleton/support/hooks.rb index 59be6d4..fba7b51 100644 --- a/features-skeleton/support/hooks.rb +++ b/features-skeleton/support/hooks.rb @@ -1,4 +1,7 @@ #Cucumber provides a number of hooks which allow us to run blocks at various points in the Cucumber test cycle +AfterConfiguration do |config| + # do something before Cucumber run test cycle and after it already configure +end Before do # Do something before each scenario. @@ -35,4 +38,9 @@ AfterStep('@Ex_tag1, @Ex_tag2') do # This will only run after steps within scenarios tagged # with @cucumis AND @sativus. -end \ No newline at end of file +end + +at_exit do + # Do something in the end of cucumber test cycle + $driver.quit # process for driver will be close with all windows +end