itms_automation 2.2 → 2.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/generate.rb +3 -37
- data/bin/helper.rb +23 -10
- data/bin/itms_automation +18 -23
- data/doc/installation.md +16 -0
- data/doc/itms-automation-API.md +103 -0
- data/doc/itms-automation-help.md +18 -0
- data/example/android/android_app/android_app_calculator.zip +0 -0
- data/example/android/android_app/android_app_calculator/AndroidCalculator.apk +0 -0
- data/example/android/android_app/android_app_calculator/features/calculator.feature +36 -0
- data/example/android/android_app/android_app_calculator/features/my_first.feature +13 -0
- data/example/android/android_app/android_app_calculator/features/screenshots/test.png +0 -0
- data/example/android/android_app/android_app_calculator/features/step_definitions/custom_steps.rb +5 -0
- data/example/android/android_app/android_app_calculator/features/support/env.rb +52 -0
- data/example/android/android_app/android_app_calculator/features/support/hooks.rb +26 -0
- data/example/android/android_web/android_web_gmail_login.zip +0 -0
- data/example/android/android_web/android_web_gmail_login/features/gmail_login.feature +12 -0
- data/example/android/android_web/android_web_gmail_login/features/my_first.feature +1 -0
- data/example/android/android_web/android_web_gmail_login/features/screenshots/test.png +0 -0
- data/example/android/android_web/android_web_gmail_login/features/step_definitions/custom_steps.rb +5 -0
- data/example/android/android_web/android_web_gmail_login/features/support/env.rb +51 -0
- data/example/android/android_web/android_web_gmail_login/features/support/hooks.rb +27 -0
- data/example/desktop web/desktop_web_gmail_login.zip +0 -0
- data/example/desktop web/desktop_web_gmail_login/features/gmail_login.feature +9 -0
- data/example/desktop web/desktop_web_gmail_login/features/gmail_multi_login.feature +21 -0
- data/example/desktop web/desktop_web_gmail_login/features/my_first.feature +1 -0
- data/example/desktop web/desktop_web_gmail_login/features/screenshots/test.png +0 -0
- data/example/desktop web/desktop_web_gmail_login/features/step_definitions/custom_steps.rb +5 -0
- data/example/desktop web/desktop_web_gmail_login/features/support/env.rb +106 -0
- data/example/desktop web/desktop_web_gmail_login/features/support/hooks.rb +38 -0
- data/features-skeleton/my_first.feature +5 -0
- data/features-skeleton/screenshots/test.png +0 -0
- data/features-skeleton/step_definitions/custom_steps.rb +5 -0
- data/features-skeleton/step_definitions/repositories/project_object.yml +1 -0
- data/features-skeleton/support/env.rb +106 -0
- data/features-skeleton/support/hooks.rb +38 -0
- data/lib/itms_automation.rb +1 -3
- data/lib/itms_automation/assertion_steps.rb +68 -0
- data/lib/itms_automation/click_elements_steps.rb +24 -0
- data/lib/itms_automation/configuration_steps.rb +7 -0
- data/lib/itms_automation/input_steps.rb +59 -0
- data/lib/itms_automation/javascript_handling_steps.rb +10 -0
- data/lib/itms_automation/methods/assertion_methods.rb +333 -0
- data/lib/itms_automation/methods/click_elements_methods.rb +23 -0
- data/lib/itms_automation/methods/configuration_methods.rb +35 -0
- data/lib/itms_automation/methods/error_handling_methods.rb +93 -0
- data/lib/itms_automation/methods/input_methods.rb +69 -0
- data/lib/itms_automation/methods/javascript_handling_methods.rb +9 -0
- data/lib/itms_automation/methods/misc_methods.rb +63 -0
- data/lib/itms_automation/methods/navigate_methods.rb +123 -0
- data/lib/itms_automation/methods/progress_methods.rb +15 -0
- data/lib/itms_automation/methods/required_files.rb +9 -0
- data/lib/itms_automation/methods/screenshot_methods.rb +6 -0
- data/lib/itms_automation/navigation_steps.rb +79 -0
- data/lib/itms_automation/progress_steps.rb +17 -0
- data/lib/itms_automation/screenshot_steps.rb +6 -0
- data/lib/itms_automation/version.rb +5 -3
- metadata +78 -94
- data/bin/console +0 -14
- data/bin/documentation_generator.rb +0 -119
- data/bin/setup +0 -8
- data/lib/itms_automation/all_steps.rb +0 -8
- data/lib/itms_automation/assertion_helper.rb +0 -29
- data/lib/itms_automation/auto_util.rb +0 -699
- data/lib/itms_automation/database_steps_helper.rb +0 -125
- data/lib/itms_automation/web_steps_helper.rb +0 -838
- data/project/Gemfile +0 -3
- data/project/README.md +0 -34
- data/project/Rakefile +0 -24
- data/project/config/chrome_headless_options.yaml +0 -1
- data/project/config/chrome_options.yaml +0 -6
- data/project/config/firefox_headless_options.yaml +0 -1
- data/project/config/firefox_options.yaml +0 -1
- data/project/config/ie_options.yaml +0 -1
- data/project/config/remote_options.yaml +0 -6
- data/project/config/safari_options.yaml +0 -1
- data/project/cucumber.yml +0 -4
- data/project/features/TestSuite/WebGUI.feature +0 -4
- data/project/features/step_definitions/lib_steps/steps_definition.rb +0 -3
- data/project/features/step_definitions/repositories/project_object.yml +0 -2
- data/project/features/support/env.rb +0 -10
- data/project/features/support/hooks.rb +0 -128
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03c38ca27fff8e41d5bc25a5f98019cbf4e4cc90f1be655b0264b2da1301a2f7
|
4
|
+
data.tar.gz: 6ef0427780ea0b6cfade74682e8d60529fa7194bea56b56546fd786034871bf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e4d5042bb36effd440cda7b75e0ea9547a3b5039b6b360fe77d940113480fb82fa5bff6ed3719177c2489f8fd4d6d1e43c48db00562f766a5552b5a01025f69
|
7
|
+
data.tar.gz: 4ac9c825eb5584fece56a3106430de1991c439cdbf4040afe8028091dfb5d2555d8cc03caac65a323fc30b88df8ea66451ebacb8257407f5381b198f761ae5f3
|
data/bin/generate.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
|
2
1
|
def itms_automation_scaffold
|
3
2
|
if File.exists?(@features_dir)
|
4
|
-
puts
|
3
|
+
puts "A features directory already exists. Stopping..."
|
5
4
|
exit 1
|
6
5
|
end
|
7
6
|
msg("Question") do
|
@@ -13,41 +12,8 @@ def itms_automation_scaffold
|
|
13
12
|
|
14
13
|
FileUtils.cp_r(@source_dir, @features_dir)
|
15
14
|
|
16
|
-
msg(
|
17
|
-
puts "
|
18
|
-
end
|
19
|
-
msg('Gemfile') do
|
20
|
-
puts "iTMS Automation created Gemfile containing all required Gems\n"
|
21
|
-
end
|
22
|
-
msg('cucumber.yml') do
|
23
|
-
puts "iTMS Automation created cucumber.yml file with profiles of all needed configurations\n"
|
24
|
-
end
|
25
|
-
msg('config/chrome_headless_options.yaml') do
|
26
|
-
puts "iTMS Automation created chrome_headless_options.yml file with profiles of all needed configurations\n"
|
27
|
-
end
|
28
|
-
msg('config/firefox_headless_options.yaml') do
|
29
|
-
puts "iTMS Automation created firefox_headless_options.yml file with profiles of all needed configurations\n"
|
30
|
-
end
|
31
|
-
msg('config/chrome_options.yaml') do
|
32
|
-
puts "iTMS Automation created chrome_options.yml file with profiles of all needed configurations\n"
|
33
|
-
end
|
34
|
-
msg('config/firefox_options.yaml') do
|
35
|
-
puts "iTMS Automation created firefox_options.yml file with profiles of all needed configurations\n"
|
36
|
-
end
|
37
|
-
msg('config/ie_options.yaml') do
|
38
|
-
puts "iTMS Automation created ie_options.yml file with profiles of all needed configurations\n"
|
39
|
-
end
|
40
|
-
msg('config/remote_options.yaml') do
|
41
|
-
puts "iTMS Automation created remote_options.yml file with profiles of all needed configurations\n"
|
42
|
-
end
|
43
|
-
msg('config/safari_options.yaml') do
|
44
|
-
puts "iTMS Automation created safari_options.yml file with profiles of all needed configurations\n"
|
45
|
-
end
|
46
|
-
msg('README.md') do
|
47
|
-
puts "iTMS Automation created README.md file with template usage\n"
|
48
|
-
end
|
49
|
-
msg('Info') do
|
50
|
-
puts "All Config files created. \n"
|
15
|
+
msg("Info") do
|
16
|
+
puts "features subdirectory created. \n"
|
51
17
|
end
|
52
18
|
|
53
19
|
end
|
data/bin/helper.rb
CHANGED
@@ -3,15 +3,31 @@ require 'json'
|
|
3
3
|
require "rubygems"
|
4
4
|
|
5
5
|
def msg(title, &block)
|
6
|
-
puts "\n" +
|
7
|
-
|
8
|
-
puts
|
9
|
-
|
6
|
+
puts "\n" + "-"*10 + title + "-"*10
|
7
|
+
block.call
|
8
|
+
puts "-"*10 + "-------" + "-"*10 + "\n"
|
9
|
+
end
|
10
|
+
|
11
|
+
def print_usage
|
12
|
+
puts <<EOF
|
13
|
+
|
14
|
+
Usage: itms_automation <command-name> [parameters] [options]
|
15
|
+
|
16
|
+
<command-name> can be one of
|
17
|
+
help
|
18
|
+
prints more detailed help information.
|
19
|
+
gen
|
20
|
+
generate a features folder structure.
|
21
|
+
version
|
22
|
+
prints the gem version
|
23
|
+
|
24
|
+
<options> can be
|
25
|
+
-v, --verbose Turns on verbose logging
|
26
|
+
EOF
|
10
27
|
end
|
11
28
|
|
12
29
|
def print_help
|
13
30
|
puts <<EOF
|
14
|
-
Author: iTMS
|
15
31
|
|
16
32
|
Usage: itms_automation <command-name> [parameters] [options]
|
17
33
|
|
@@ -19,19 +35,16 @@ def print_help
|
|
19
35
|
help
|
20
36
|
gen
|
21
37
|
version
|
22
|
-
ls
|
23
38
|
|
24
39
|
Commands:
|
25
40
|
help : prints more detailed help information.
|
26
41
|
|
27
|
-
gen : creates a features dir. This is usually used once when
|
28
|
-
setting up
|
42
|
+
gen : creates a skeleton features dir. This is usually used once when
|
43
|
+
setting up selnium-cucumber to ensure that the features folder contains
|
29
44
|
the right step definitions and environment to run with cucumber.
|
30
45
|
|
31
46
|
version : prints the gem version
|
32
47
|
|
33
|
-
ls: list all steps name of itms_automation framework
|
34
|
-
|
35
48
|
<Options>
|
36
49
|
-v, --verbose Turns on verbose logging
|
37
50
|
EOF
|
data/bin/itms_automation
CHANGED
@@ -1,32 +1,27 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
|
2
3
|
require_relative 'helper.rb'
|
3
4
|
require_relative 'generate.rb'
|
4
|
-
require_relative 'documentation_generator.rb'
|
5
5
|
require 'itms_automation/version'
|
6
6
|
|
7
|
-
@features_dir = File.join(FileUtils.pwd, "
|
8
|
-
@
|
9
|
-
|
10
|
-
|
11
|
-
case search_string
|
12
|
-
when /version/
|
13
|
-
puts ItmsAutomation::VERSION
|
14
|
-
when /gen/
|
15
|
-
itms_automation_scaffold
|
16
|
-
when /ls/
|
17
|
-
ORDERED_KINDS = %w[Given When Then]
|
18
|
-
heading = 'All itms_automation steps'
|
7
|
+
@features_dir = File.join(FileUtils.pwd, "features")
|
8
|
+
@support_dir = File.join(@features_dir, "support")
|
9
|
+
@support_dir = File.join(@features_dir, "screenshots")
|
10
|
+
@source_dir = File.join(File.dirname(__FILE__), '..', 'features-skeleton')
|
19
11
|
|
20
|
-
|
21
|
-
|
22
|
-
|
12
|
+
if (ARGV.length == 0)
|
13
|
+
print_usage
|
14
|
+
else
|
15
|
+
cmd = ARGV.shift
|
23
16
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
17
|
+
if cmd == "help"
|
18
|
+
print_help
|
19
|
+
elsif cmd == "gen"
|
20
|
+
itms_automation_scaffold
|
21
|
+
elsif cmd == "version"
|
22
|
+
puts ITMS::Automation::VERSION
|
23
|
+
else
|
24
|
+
print_usage
|
25
|
+
end
|
29
26
|
end
|
30
27
|
|
31
|
-
|
32
|
-
|
data/doc/installation.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
Installation
|
2
|
+
============
|
3
|
+
### Prerequisites
|
4
|
+
You need to have Ruby installed.
|
5
|
+
Verify your installation by running ruby -v in a terminal - it should print "ruby 1.9.3" (or higher).
|
6
|
+
|
7
|
+
You need to have DevKit installed.
|
8
|
+
|
9
|
+
You can get Ruby and DevKit from [RubyInstaller.org](http://rubyinstaller.org/)
|
10
|
+
|
11
|
+
### Installation
|
12
|
+
|
13
|
+
Install `itms_automation` gem by running
|
14
|
+
|
15
|
+
- `gem install itms_automation`
|
16
|
+
|
@@ -0,0 +1,103 @@
|
|
1
|
+
itms_automation Ruby API's
|
2
|
+
============================
|
3
|
+
|
4
|
+
If you are writing code for your custom steps you can use the following methods :
|
5
|
+
|
6
|
+
Note : For some of the API paramtere values are fixed. Such values for paramaters are mentioned below.
|
7
|
+
|
8
|
+
Navigation API's
|
9
|
+
----------------
|
10
|
+
|
11
|
+
navigate_to("link")
|
12
|
+
|
13
|
+
navigate(direction) # direction => "back" / "forward"
|
14
|
+
|
15
|
+
close_driver()
|
16
|
+
|
17
|
+
|
18
|
+
Browser Interaction API's
|
19
|
+
-------------------------
|
20
|
+
|
21
|
+
resize_browser(width, height)
|
22
|
+
|
23
|
+
scroll_page(to) # to => "top" / "end"
|
24
|
+
|
25
|
+
scroll_to_element(by, access_value)
|
26
|
+
|
27
|
+
zoom_in_out(in_out) # in_out => "add" / "subtract"
|
28
|
+
|
29
|
+
zoom_in_out_till_element_display(by, in_out, access_value) # in_out => "add" / "subtract"
|
30
|
+
|
31
|
+
|
32
|
+
Input API's
|
33
|
+
------------
|
34
|
+
|
35
|
+
click(element)
|
36
|
+
|
37
|
+
double_click(element)
|
38
|
+
|
39
|
+
click_forcefully(element)
|
40
|
+
|
41
|
+
enter_text(element, text)
|
42
|
+
|
43
|
+
clear_text(element)
|
44
|
+
|
45
|
+
check_checkbox(element)
|
46
|
+
|
47
|
+
uncheck_checkbox(element)
|
48
|
+
|
49
|
+
toggle_checkbox(element)
|
50
|
+
|
51
|
+
select_radio_button(element)
|
52
|
+
|
53
|
+
get_page_title()
|
54
|
+
|
55
|
+
get_element_text(element)
|
56
|
+
|
57
|
+
get_element_attribute(element, attribute)
|
58
|
+
|
59
|
+
is_element_enabled(element)
|
60
|
+
|
61
|
+
is_element_displayed(element)
|
62
|
+
|
63
|
+
hover_over_element(element)
|
64
|
+
|
65
|
+
by => "locators type" ("id", "name", "class", "xpath", "css")
|
66
|
+
|
67
|
+
access_value => "locator value"
|
68
|
+
|
69
|
+
|
70
|
+
Javascript Handling API
|
71
|
+
-----------------------
|
72
|
+
|
73
|
+
handle_alert(decision) # decision => "accept" / "dismiss"
|
74
|
+
|
75
|
+
get_alert_text
|
76
|
+
|
77
|
+
|
78
|
+
Progress API's
|
79
|
+
--------------
|
80
|
+
|
81
|
+
wait(time_in_sec)
|
82
|
+
|
83
|
+
wait_for_element_to_display(element, duration)
|
84
|
+
|
85
|
+
wait_for_element_to_enable(element, duration)
|
86
|
+
|
87
|
+
|
88
|
+
by => "locators type" ("id", "name", "class", "xpath", "css")
|
89
|
+
|
90
|
+
access_value => "locator value"
|
91
|
+
|
92
|
+
duration => duration in seconds.
|
93
|
+
|
94
|
+
|
95
|
+
Screenshot API
|
96
|
+
--------------
|
97
|
+
take_screenshots
|
98
|
+
|
99
|
+
|
100
|
+
Configuration API
|
101
|
+
-----------------
|
102
|
+
|
103
|
+
print_congifugartion
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
Usage: itms_automation <command-name> [parameters] [options]
|
3
|
+
|
4
|
+
<command-name> can be one of
|
5
|
+
help
|
6
|
+
gen
|
7
|
+
version
|
8
|
+
|
9
|
+
Commands:
|
10
|
+
help : prints more detailed help information.
|
11
|
+
|
12
|
+
gen : creates a skeleton features dir. This is usually used once when
|
13
|
+
setting up selnium-cucumber to ensure that the features folder contains
|
14
|
+
the right step definitions and environment to run with cucumber.
|
15
|
+
|
16
|
+
version : prints the gem version
|
17
|
+
|
18
|
+
Options: -v, --verbose Turns on verbose logging
|
Binary file
|
@@ -0,0 +1,36 @@
|
|
1
|
+
Feature: Verify Calculator functionalities
|
2
|
+
|
3
|
+
Scenario: Click on OK button
|
4
|
+
Then I click on element having id "com.android2.calculator3:id/cling_dismiss"
|
5
|
+
|
6
|
+
Scenario: Addirion
|
7
|
+
Then I click on element having id "com.android2.calculator3:id/digit5"
|
8
|
+
Then I click on element having id "com.android2.calculator3:id/plus"
|
9
|
+
Then I click on element having id "com.android2.calculator3:id/digit9"
|
10
|
+
When I click on element having id "com.android2.calculator3:id/equal"
|
11
|
+
Then element having xpath "//android.widget.EditText[@index=0]" should have text as "14"
|
12
|
+
|
13
|
+
|
14
|
+
Scenario: Substraction
|
15
|
+
Then I click on element having id "com.android2.calculator3:id/digit9"
|
16
|
+
Then I click on element having id "com.android2.calculator3:id/minus"
|
17
|
+
Then I click on element having id "com.android2.calculator3:id/digit5"
|
18
|
+
When I click on element having id "com.android2.calculator3:id/equal"
|
19
|
+
Then element having xpath "//android.widget.EditText[@index=0]" should have text as "4"
|
20
|
+
|
21
|
+
Scenario: Multiplication
|
22
|
+
Then I click on element having id "com.android2.calculator3:id/digit9"
|
23
|
+
Then I click on element having id "com.android2.calculator3:id/mul"
|
24
|
+
Then I click on element having id "com.android2.calculator3:id/digit5"
|
25
|
+
When I click on element having id "com.android2.calculator3:id/equal"
|
26
|
+
Then element having xpath "//android.widget.EditText[@index=0]" should have text as "45"
|
27
|
+
|
28
|
+
Scenario: Division
|
29
|
+
Then I click on element having id "com.android2.calculator3:id/digit8"
|
30
|
+
Then I click on element having id "com.android2.calculator3:id/div"
|
31
|
+
Then I click on element having id "com.android2.calculator3:id/digit2"
|
32
|
+
When I click on element having id "com.android2.calculator3:id/equal"
|
33
|
+
Then element having xpath "//android.widget.EditText[@index=0]" should have text as "4"
|
34
|
+
|
35
|
+
Scenario: Clear output
|
36
|
+
Then I click on element having id "com.android2.calculator3:id/clear"
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#Scenario: Division
|
2
|
+
# Then I click on element having id "com.android2.calculator3:id/digit8"
|
3
|
+
# Then I click on element having id "com.android2.calculator3:id/div"
|
4
|
+
# Then I click on element having id "com.android2.calculator3:id/digit4"
|
5
|
+
# When I click on element having id "com.android2.calculator3:id/equal"
|
6
|
+
# Then element having xpath "//android.widget.EditText[@index=0]" should have text as "2"
|
7
|
+
|
8
|
+
# Scenario: Multiplication
|
9
|
+
# Then I click on element having id "com.android2.calculator3:id/digit6"
|
10
|
+
# Then I click on element having id "com.android2.calculator3:id/mul"
|
11
|
+
# Then I click on element having id "com.android2.calculator3:id/digit5"
|
12
|
+
# When I click on element having id "com.android2.calculator3:id/equal"
|
13
|
+
# Then element having xpath "//android.widget.EditText[@index=0]" should have text as "30"
|
Binary file
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'itms_automation'
|
3
|
+
|
4
|
+
# Store command line arguments
|
5
|
+
$browser_type = ENV['BROWSER'] || 'ff'
|
6
|
+
$platform = ENV['PLATFORM'] || 'desktop'
|
7
|
+
$os_version = ENV['OS_VERSION']
|
8
|
+
$device_name = ENV['DEVICE_NAME']
|
9
|
+
$udid = ENV['UDID']
|
10
|
+
$app_path = ENV['APP_PATH']
|
11
|
+
|
12
|
+
# check for valid parameters
|
13
|
+
validate_parameters $platform, $browser_type, $app_path
|
14
|
+
|
15
|
+
# If platform is android or ios create driver instance for mobile browser
|
16
|
+
if $platform == 'android' or $platform == 'iOS'
|
17
|
+
|
18
|
+
if $browser_type == 'native'
|
19
|
+
$browser_type = "Browser"
|
20
|
+
end
|
21
|
+
|
22
|
+
if $platform == 'android'
|
23
|
+
$device_name, $os_version = get_device_info
|
24
|
+
end
|
25
|
+
|
26
|
+
desired_caps = {
|
27
|
+
caps: {
|
28
|
+
platformName: $platform,
|
29
|
+
browserName: $browser_type,
|
30
|
+
versionNumber: $os_version,
|
31
|
+
deviceName: $device_name,
|
32
|
+
udid: $udid,
|
33
|
+
app: ".//#{$app_path}"
|
34
|
+
},
|
35
|
+
appium_lib: { server_url: 'http://localhost:4723/wd/hub' }
|
36
|
+
}
|
37
|
+
|
38
|
+
begin
|
39
|
+
$driver = Appium::Driver.new(desired_caps).start_driver
|
40
|
+
rescue Exception => e
|
41
|
+
puts e.message
|
42
|
+
Process.exit(0)
|
43
|
+
end
|
44
|
+
else # else create driver instance for desktop browser
|
45
|
+
begin
|
46
|
+
$driver = Selenium::WebDriver.for(:"#{$browser_type}")
|
47
|
+
$driver.manage().window().maximize()
|
48
|
+
rescue Exception => e
|
49
|
+
puts e.message
|
50
|
+
Process.exit(0)
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#Cucumber provides a number of hooks which allow us to run blocks at various points in the Cucumber test cycle
|
2
|
+
|
3
|
+
Before do
|
4
|
+
# Do something before each scenario.
|
5
|
+
end
|
6
|
+
|
7
|
+
Before do |scenario|
|
8
|
+
# The +scenario+ argument is optional, but if you use it, you can get the title,
|
9
|
+
# description, or name (title + description) of the scenario that is about to be
|
10
|
+
# executed.
|
11
|
+
end
|
12
|
+
|
13
|
+
After do
|
14
|
+
# Do something after each scenario.
|
15
|
+
end
|
16
|
+
|
17
|
+
After do |scenario|
|
18
|
+
# Do something after each scenario.
|
19
|
+
# The +scenario+ argument is optional, but
|
20
|
+
# if you use it, you can inspect status with
|
21
|
+
# the #failed?, #passed? and #exception methods.
|
22
|
+
|
23
|
+
if(scenario.failed?)
|
24
|
+
#Do something if scenario fails.
|
25
|
+
end
|
26
|
+
end
|