selenium-cucumber 2.1.4 → 3.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/bin/generate.rb +19 -20
  3. data/bin/helper.rb +50 -50
  4. data/bin/selenium-cucumber +29 -30
  5. data/doc/canned_steps.md +656 -656
  6. data/doc/installation.md +16 -16
  7. data/doc/selenium-cucumber-API.md +120 -120
  8. data/doc/selenium-cucumber-help.md +18 -18
  9. data/features-skeleton/my_first.feature +5 -5
  10. data/features-skeleton/step_definitions/custom_steps.rb +4 -4
  11. data/features-skeleton/support/env.rb +51 -51
  12. data/features-skeleton/support/hooks.rb +47 -38
  13. data/lib/selenium-cucumber.rb +1 -1
  14. data/lib/selenium-cucumber/assertion_steps.rb +89 -89
  15. data/lib/selenium-cucumber/click_elements_steps.rb +36 -36
  16. data/lib/selenium-cucumber/configuration_steps.rb +6 -6
  17. data/lib/selenium-cucumber/input_steps.rb +69 -69
  18. data/lib/selenium-cucumber/javascript_handling_steps.rb +9 -9
  19. data/lib/selenium-cucumber/methods/assertion_methods.rb +295 -344
  20. data/lib/selenium-cucumber/methods/click_elements_methods.rb +23 -23
  21. data/lib/selenium-cucumber/methods/configuration_methods.rb +35 -35
  22. data/lib/selenium-cucumber/methods/error_handling_methods.rb +86 -86
  23. data/lib/selenium-cucumber/methods/input_methods.rb +67 -67
  24. data/lib/selenium-cucumber/methods/javascript_handling_methods.rb +9 -9
  25. data/lib/selenium-cucumber/methods/misc_methods.rb +34 -34
  26. data/lib/selenium-cucumber/methods/mobile_methods.rb +241 -241
  27. data/lib/selenium-cucumber/methods/navigate_methods.rb +165 -165
  28. data/lib/selenium-cucumber/methods/progress_methods.rb +15 -15
  29. data/lib/selenium-cucumber/methods/required_files.rb +10 -10
  30. data/lib/selenium-cucumber/methods/screenshot_methods.rb +6 -6
  31. data/lib/selenium-cucumber/mobile_steps.rb +99 -99
  32. data/lib/selenium-cucumber/navigation_steps.rb +105 -105
  33. data/lib/selenium-cucumber/progress_steps.rb +18 -18
  34. data/lib/selenium-cucumber/screenshot_steps.rb +5 -5
  35. data/lib/selenium-cucumber/version.rb +5 -5
  36. metadata +69 -91
  37. data/example/android/android_app/HinduCalendar.zip +0 -0
  38. data/example/android/android_app/HinduCalendar/HinduCalendar.apk +0 -0
  39. data/example/android/android_app/HinduCalendar/README.md +0 -19
  40. data/example/android/android_app/HinduCalendar/Results.html +0 -472
  41. data/example/android/android_app/HinduCalendar/features/01_HC_homepage_menu_validation.feature +0 -36
  42. data/example/android/android_app/HinduCalendar/features/02_HC_homepage_menu_navigation.feature +0 -71
  43. data/example/android/android_app/HinduCalendar/features/03_HC_Create_Save_View_Delete_Kundali.feature +0 -63
  44. data/example/android/android_app/HinduCalendar/features/actual_images/test.png +0 -0
  45. data/example/android/android_app/HinduCalendar/features/expected_images/test.png +0 -0
  46. data/example/android/android_app/HinduCalendar/features/image_difference/test.png +0 -0
  47. data/example/android/android_app/HinduCalendar/features/my_first.feature +0 -1
  48. data/example/android/android_app/HinduCalendar/features/screenshots/test.png +0 -0
  49. data/example/android/android_app/HinduCalendar/features/step_definitions/01_HC_homepage_menu_validation.rb +0 -81
  50. data/example/android/android_app/HinduCalendar/features/step_definitions/02_HC_homepage_menu_navigation.rb +0 -132
  51. data/example/android/android_app/HinduCalendar/features/step_definitions/03_HC_Create_Save_View_Delete_Kundali.rb +0 -413
  52. data/example/android/android_app/HinduCalendar/features/step_definitions/custom_steps.rb +0 -5
  53. data/example/android/android_app/HinduCalendar/features/support/env.rb +0 -51
  54. data/example/android/android_app/HinduCalendar/features/support/hooks.rb +0 -38
  55. data/example/android/android_app/android_app_calculator.zip +0 -0
  56. data/example/android/android_app/android_app_calculator/AndroidCalculator.apk +0 -0
  57. data/example/android/android_app/android_app_calculator/features/actual_images/test.png +0 -0
  58. data/example/android/android_app/android_app_calculator/features/calculator.feature +0 -36
  59. data/example/android/android_app/android_app_calculator/features/expected_images/test.png +0 -0
  60. data/example/android/android_app/android_app_calculator/features/image_difference/test.png +0 -0
  61. data/example/android/android_app/android_app_calculator/features/my_first.feature +0 -13
  62. data/example/android/android_app/android_app_calculator/features/screenshots/test.png +0 -0
  63. data/example/android/android_app/android_app_calculator/features/step_definitions/custom_steps.rb +0 -5
  64. data/example/android/android_app/android_app_calculator/features/support/env.rb +0 -51
  65. data/example/android/android_app/android_app_calculator/features/support/hooks.rb +0 -38
  66. data/example/android/android_web/android_web_gmail_login.zip +0 -0
  67. data/example/android/android_web/android_web_gmail_login/features/actual_images/test.png +0 -0
  68. data/example/android/android_web/android_web_gmail_login/features/expected_images/test.png +0 -0
  69. data/example/android/android_web/android_web_gmail_login/features/gmail_login.feature +0 -12
  70. data/example/android/android_web/android_web_gmail_login/features/image_difference/test.png +0 -0
  71. data/example/android/android_web/android_web_gmail_login/features/my_first.feature +0 -1
  72. data/example/android/android_web/android_web_gmail_login/features/screenshots/test.png +0 -0
  73. data/example/android/android_web/android_web_gmail_login/features/step_definitions/custom_steps.rb +0 -5
  74. data/example/android/android_web/android_web_gmail_login/features/support/env.rb +0 -51
  75. data/example/android/android_web/android_web_gmail_login/features/support/hooks.rb +0 -38
  76. data/example/desktop web/desktop_web_gmail_login.zip +0 -0
  77. data/example/desktop web/desktop_web_gmail_login/features/actual_images/test.png +0 -0
  78. data/example/desktop web/desktop_web_gmail_login/features/expected_images/test.png +0 -0
  79. data/example/desktop web/desktop_web_gmail_login/features/gmail_login.feature +0 -10
  80. data/example/desktop web/desktop_web_gmail_login/features/gmail_multi_login.feature +0 -22
  81. data/example/desktop web/desktop_web_gmail_login/features/image_difference/test.png +0 -0
  82. data/example/desktop web/desktop_web_gmail_login/features/my_first.feature +0 -1
  83. data/example/desktop web/desktop_web_gmail_login/features/result.html b/data/example/desktop → web/desktop_web_gmail_login/features/result.html +0 -0
  84. data/example/desktop web/desktop_web_gmail_login/features/screenshots/test.png +0 -0
  85. data/example/desktop web/desktop_web_gmail_login/features/step_definitions/custom_steps.rb +0 -5
  86. data/example/desktop web/desktop_web_gmail_login/features/support/env.rb +0 -51
  87. data/example/desktop web/desktop_web_gmail_login/features/support/hooks.rb +0 -38
  88. data/example/desktop web/desktop_web_gmail_login/result.html +0 -478
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecc44dd5392f97bef1a9d11f81db39198fd01d34
4
- data.tar.gz: 97c26126f5d3b166334f6251681b632a2f742193
3
+ metadata.gz: e24fe4f35344bcbd0111758048ea49ee258d9f0c
4
+ data.tar.gz: 11fc63be9966096e3f746cbc6a821878bfa7a91b
5
5
  SHA512:
6
- metadata.gz: b1e9da4fecef88b9d21807648a15beadd51a10cdfab8cc651a1f96126f98333f1580f6fa49dcf2145110a332d1d396619a8031f42c5fa3b11e97c7390d43995d
7
- data.tar.gz: 915255c67542cd1bd8b2948209d80fc7f513ae600a5026fb41f869d5f4eff41197fb58ef4dc23cb41ad2861100dc1333abb823b31c6fa5ef6c1b5e7f8a2e8a9a
6
+ metadata.gz: 3a383bfc7c369c5fcb092cc2bf2846e4da91ded2ed410be12cad4db2d934efda701ae9b2e0e07bc266da3d55c678c7ef1cd62e8dd37b1b3345a038141eb0509f
7
+ data.tar.gz: c64f2973bbd195ada16a036ad0850acb9081904755cd11f1508d0fcc0ca3eae05f509e3bb9eea917a638af9933a66893a25c4f598c0ffcc090fe8fb951cc6f52
@@ -1,20 +1,19 @@
1
-
2
- def selenium_cucumber_scaffold
3
- if File.exists?(@features_dir)
4
- puts "A features directory already exists. Stopping..."
5
- exit 1
6
- end
7
- msg("Question") do
8
- puts "I'm about to create a subdirectory called features."
9
- puts "features will contain all your project tests."
10
- puts "Please hit return to confirm that's what you want."
11
- end
12
- exit 2 unless STDIN.gets.chomp == ''
13
-
14
- FileUtils.cp_r(@source_dir, @features_dir)
15
-
16
- msg("Info") do
17
- puts "features subdirectory created. \n"
18
- end
19
-
20
- end
1
+ def selenium_cucumber_scaffold
2
+ if File.exists?(@features_dir)
3
+ puts "A features directory already exists. Stopping..."
4
+ exit 1
5
+ end
6
+ msg("Question") do
7
+ puts "I'm about to create a subdirectory called features."
8
+ puts "features will contain all your project tests."
9
+ puts "Please hit return to confirm that's what you want."
10
+ end
11
+ exit 2 unless STDIN.gets.chomp == ''
12
+
13
+ FileUtils.cp_r(@source_dir, @features_dir)
14
+
15
+ msg("Info") do
16
+ puts "features subdirectory created. \n"
17
+ end
18
+
19
+ end
@@ -1,51 +1,51 @@
1
- require 'tempfile'
2
- require 'json'
3
- require "rubygems"
4
-
5
- def msg(title, &block)
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: selenium-cucumber <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
27
- end
28
-
29
- def print_help
30
- puts <<EOF
31
-
32
- Usage: selenium-cucumber <command-name> [parameters] [options]
33
-
34
- <command-name> can be one of
35
- help
36
- gen
37
- version
38
-
39
- Commands:
40
- help : prints more detailed help information.
41
-
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
44
- the right step definitions and environment to run with cucumber.
45
-
46
- version : prints the gem version
47
-
48
- <Options>
49
- -v, --verbose Turns on verbose logging
50
- EOF
1
+ require 'tempfile'
2
+ require 'json'
3
+ require "rubygems"
4
+
5
+ def msg(title, &block)
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: selenium-cucumber <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
27
+ end
28
+
29
+ def print_help
30
+ puts <<EOF
31
+
32
+ Usage: selenium-cucumber <command-name> [parameters] [options]
33
+
34
+ <command-name> can be one of
35
+ help
36
+ gen
37
+ version
38
+
39
+ Commands:
40
+ help : prints more detailed help information.
41
+
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
44
+ the right step definitions and environment to run with cucumber.
45
+
46
+ version : prints the gem version
47
+
48
+ <Options>
49
+ -v, --verbose Turns on verbose logging
50
+ EOF
51
51
  end
@@ -1,30 +1,29 @@
1
- #!/usr/bin/env ruby
2
-
3
- require_relative 'helper.rb'
4
- require_relative 'generate.rb'
5
- require 'selenium-cucumber/version'
6
-
7
- @features_dir = File.join(FileUtils.pwd, "features")
8
- @support_dir = File.join(@features_dir, "support")
9
- @support_dir = File.join(@features_dir, "expected_images")
10
- @support_dir = File.join(@features_dir, "actual_images")
11
- @support_dir = File.join(@features_dir, "image_difference")
12
- @support_dir = File.join(@features_dir, "screenshots")
13
- @source_dir = File.join(File.dirname(__FILE__), '..', 'features-skeleton')
14
-
15
- if (ARGV.length == 0)
16
- print_usage
17
- else
18
- cmd = ARGV.shift
19
-
20
- if cmd == "help"
21
- print_help
22
- elsif cmd == "gen"
23
- selenium_cucumber_scaffold
24
- elsif cmd == "version"
25
- puts Selenium::Cucumber::VERSION
26
- else
27
- print_usage
28
- end
29
- end
30
-
1
+ #!/usr/bin/env ruby
2
+ require_relative 'helper.rb'
3
+ require_relative 'generate.rb'
4
+ require 'selenium-cucumber/version'
5
+
6
+ @features_dir = File.join(FileUtils.pwd, "features")
7
+ @support_dir = File.join(@features_dir, "support")
8
+ @support_dir = File.join(@features_dir, "expected_images")
9
+ @support_dir = File.join(@features_dir, "actual_images")
10
+ @support_dir = File.join(@features_dir, "image_difference")
11
+ @support_dir = File.join(@features_dir, "screenshots")
12
+ @source_dir = File.join(File.dirname(__FILE__), '..', 'features-skeleton')
13
+
14
+ if (ARGV.length == 0)
15
+ print_usage
16
+ else
17
+ cmd = ARGV.shift
18
+
19
+ if cmd == "help"
20
+ print_help
21
+ elsif cmd == "gen"
22
+ selenium_cucumber_scaffold
23
+ elsif cmd == "version"
24
+ puts Selenium::Cucumber::VERSION
25
+ else
26
+ print_usage
27
+ end
28
+ end
29
+
@@ -1,656 +1,656 @@
1
- # Canned Steps
2
-
3
- selenium-cucumber comes with the following set of predefined steps.
4
- You can add your own steps or change the ones you see here.
5
-
6
-
7
- * [Navigation Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#navigation-steps)
8
- * [Assertion Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#assertion-steps)
9
- * [Input Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#input-steps)
10
- * [Click Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#click-steps)
11
- * [Progress Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#progress-steps)
12
- * [Screenshot Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#screenshot-steps)
13
- * [Configuration Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#configuration-steps)
14
- * [Mobile steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#mobile-steps)
15
-
16
-
17
-
18
- ## Navigation Steps
19
-
20
- To open/close URL and to navigate between pages use following steps :
21
-
22
- Then I navigate to "([^\"]*)"
23
- Then I navigate forward
24
- Then I navigate back
25
- Then I refresh page
26
-
27
- To switch between windows use following steps :
28
-
29
- Then I switch to new window
30
- Then I switch to previous window
31
- Then I switch to window having title "(.*?)"
32
- Then I close new window
33
- Then I switch to main window
34
-
35
- To switch between frames use following steps :
36
-
37
- Then I switch to frame "(.*?)"
38
- Then I switch to main content
39
-
40
- To interact with browser use following steps :
41
-
42
- Then I resize browser window size to width (\d+) and height (\d+)
43
- Then I maximize browser window
44
- Then I close browser
45
-
46
- To zoom in/out webpage use following steps :
47
-
48
- Then I zoom in page
49
- Then I zoom out page
50
-
51
- To zoom out webpage till necessary element displays use following steps :
52
-
53
- Then I zoom out page till I see element having id "(.*?)"
54
- Then I zoom out page till I see element having name "(.*?)"
55
- Then I zoom out page till I see element having class "(.*?)"
56
- Then I zoom out page till I see element having xpath "(.*?)"
57
- Then I zoom out page till I see element having css "(.*?)"
58
-
59
- To reset webpage view use following step :
60
-
61
- Then I reset page view
62
-
63
- To scroll webpage use following steps :
64
-
65
- Then I scroll to top of page
66
- Then I scroll to end of page
67
-
68
- To scroll webpage to specific element use following steps :
69
-
70
- Then I scroll to element having id "(.*?)"
71
- Then I scroll to element having name "(.*?)"
72
- Then I scroll to element having class "(.*?)"
73
- Then I scroll to element having xpath "(.*?)"
74
- Then I scroll to element having css "(.*?)"
75
-
76
- To hover over a element use following steps :
77
-
78
- Then I hover over element having id "(.*?)"
79
- Then I hover over element having name "(.*?)"
80
- Then I hover over element having class "(.*?)"
81
- Then I hover over element having xpath "(.*?)"
82
- Then I hover over element having css "(.*?)"
83
-
84
-
85
- Assertion Steps
86
- ---------------
87
- To assert that page title can be found use following step :
88
-
89
- Then I should see page title as "(.*?)"
90
- Then I should not see page title as "(.*?)"
91
-
92
- Then I should see page title having partial text as "(.*?)"
93
- Then I should not see page title having partial text as "(.*?)"
94
-
95
- #### Steps For Asserting Element Text
96
-
97
- To assert element text use any of the following steps :
98
-
99
- Then element having id "([^\"]*)" should have text as "(.*?)"
100
- Then element having name "([^\"]*)" should have text as "(.*?)"
101
- Then element having class "([^\"]*)" should have text as "(.*?)"
102
- Then element having xpath "([^\"]*)" should have text as "(.*?)"
103
- Then element having css "([^\"]*)" should have text as "(.*?)"
104
-
105
- Then element having id "([^\"]*)" should have partial text as "(.*?)"
106
- Then element having name "([^\"]*)" should have partial text as "(.*?)"
107
- Then element having class "([^\"]*)" should have partial text as "(.*?)"
108
- Then element having xpath "([^\"]*)" should have partial text as "(.*?)"
109
- Then element having css "([^\"]*)" should have partial text as "(.*?)"
110
-
111
- Then element having id "([^\"]*)" should not have text as "(.*?)"
112
- Then element having name "([^\"]*)" should not have text as "(.*?)"
113
- Then element having class "([^\"]*)" should not have text as "(.*?)"
114
- Then element having xpath "([^\"]*)" should not have text as "(.*?)"
115
- Then element having css "([^\"]*)" should not have text as "(.*?)"
116
-
117
- Then element having id "([^\"]*)" should not have partial text as "(.*?)"
118
- Then element having name "([^\"]*)" should not have partial text as "(.*?)"
119
- Then element having class "([^\"]*)" should not have partial text as "(.*?)"
120
- Then element having xpath "([^\"]*)" should not have partial text as "(.*?)"
121
- Then element having css "([^\"]*)" should not have partial text as "(.*?)"
122
-
123
- #### Steps For Asserting Element Attribute
124
-
125
- To assert element attribute use any of the following steps :
126
-
127
- Then element having id "([^\"]*)" should have attribute "(.*?)" with value "(.*?)"
128
- Then element having name "([^\"]*)" should have attribute "(.*?)" with value "(.*?)"
129
- Then element having class "([^\"]*)" should have attribute "(.*?)" with value "(.*?)"
130
- Then element having xpath "([^\"]*)" should have attribute "(.*?)" with value "(.*?)"
131
- Then element having css "([^\"]*)" should have attribute "(.*?)" with value "(.*?)"
132
-
133
- Then element having id "([^\"]*)" should not have attribute "(.*?)" with value "(.*?)"
134
- Then element having name "([^\"]*)" should not have attribute "(.*?)" with value "(.*?)"
135
- Then element having class "([^\"]*)" should not have attribute "(.*?)" with value "(.*?)"
136
- Then element having xpath "([^\"]*)" should not have attribute "(.*?)" with value "(.*?)"
137
- Then element having css "([^\"]*)" should not have attribute "(.*?)" with value "(.*?)"
138
-
139
-
140
- #### Steps For Asserting Element Accesibility
141
-
142
- To assert that element is enabled use any of the following steps :
143
-
144
- Then element having id "([^\"]*)" should be enabled
145
- Then element having name "([^\"]*)" should be enabled
146
- Then element having class "([^\"]*)" should be enabled
147
- Then element having xpath "([^\"]*)" should be enabled
148
- Then element having css "([^\"]*)" should be enabled
149
-
150
- To assert that element is disabled use any of the following steps :
151
-
152
- Then element having id "([^\"]*)" should be disabled
153
- Then element having name "([^\"]*)" should be disabled
154
- Then element having class "([^\"]*)" should be disabled
155
- Then element having xpath "([^\"]*)" should be disabled
156
- Then element having css "([^\"]*)" should be disabled
157
-
158
- #### Steps For Asserting Element Visibility
159
-
160
- To assert that element is present use any of the following steps :
161
-
162
- Then element having id "([^\"]*)" should be present
163
- Then element having name "([^\"]*)" should be present
164
- Then element having class "([^\"]*)" should be present
165
- Then element having xpath "([^\"]*)" should be present
166
- Then element having css "([^\"]*)" should be present
167
-
168
- To assert that element is not present use any of the following steps:
169
-
170
- Then element having id "([^\"]*)" should not be present
171
- Then element having name "([^\"]*)" should not be present
172
- Then element having class "([^\"]*)" should not be present
173
- Then element having xpath "([^\"]*)" should not be present
174
- Then element having css "([^\"]*)" should not be present
175
-
176
- #### Steps For Asserting Checkbox
177
-
178
- To assert that checkbox is checked use any of the following steps :
179
-
180
- Then checkbox having id "(.*?)" should be checked
181
- Then checkbox having name "(.*?)" should be checked
182
- Then checkbox having class "(.*?)" should be checked
183
- Then checkbox having xpath "(.*?)" should be checked
184
- Then checkbox having css "(.*?)" should be checked
185
-
186
- To assert that checkbox is unchecked use any of the following steps :
187
-
188
- Then checkbox having id "(.*?)" should be unchecked
189
- Then checkbox having name "(.*?)" should be unchecked
190
- Then checkbox having class "(.*?)" should be unchecked
191
- Then checkbox having xpath "(.*?)" should be unchecked
192
- Then checkbox having css "(.*?)" should be unchecked
193
-
194
- #### Steps For Asserting Dropdown List
195
-
196
- To assert that option by text from dropdown list selected use following steps :
197
-
198
- Then option "(.*?)" by text from dropdown having id "(.*?)" should be selected
199
- Then option "(.*?)" by text from dropdown having name "(.*?)" should be selected
200
- Then option "(.*?)" by text from dropdown having class "(.*?)" should be selected
201
- Then option "(.*?)" by text from dropdown having xpath "(.*?)" should be selected
202
- Then option "(.*?)" by text from dropdown having css "(.*?)" should be selected
203
-
204
- To assert that option by value from dropdown list selected use following steps :
205
-
206
- Then option "(.*?)" by value from dropdown having id "(.*?)" should be selected
207
- Then option "(.*?)" by value from dropdown having name "(.*?)" should be selected
208
- Then option "(.*?)" by value from dropdown having class "(.*?)" should be selected
209
- Then option "(.*?)" by value from dropdown having xpath "(.*?)" should be selected
210
- Then option "(.*?)" by value from dropdown having css "(.*?)" should be selected
211
-
212
- To assert that option by text from dropdown list unselected use following steps :
213
-
214
- Then option "(.*?)" by text from dropdown having id "(.*?)" should be unselected
215
- Then option "(.*?)" by text from dropdown having name "(.*?)" should be unselected
216
- Then option "(.*?)" by text from dropdown having class "(.*?)" should be unselected
217
- Then option "(.*?)" by text from dropdown having xpath "(.*?)" should be unselected
218
- Then option "(.*?)" by text from dropdown having css "(.*?)" should be unselected
219
-
220
- To assert that option by value from dropdown list unselected use following steps :
221
-
222
- Then option "(.*?)" by value from dropdown having id "(.*?)" should be unselected
223
- Then option "(.*?)" by value from dropdown having name "(.*?)" should be unselected
224
- Then option "(.*?)" by value from dropdown having class "(.*?)" should be unselected
225
- Then option "(.*?)" by value from dropdown having xpath "(.*?)" should be unselected
226
- Then option "(.*?)" by value from dropdown having css "(.*?)" should be unselected
227
-
228
- #### Steps For Asserting Radio Button
229
-
230
- To assert that radio button selected use any of the following steps :
231
-
232
- Then radio button having id "(.*?)" should be selected
233
- Then radio button having name "(.*?)" should be selected
234
- Then radio button having class "(.*?)" should be selected
235
- Then radio button having xpath "(.*?)" should be selected
236
- Then radio button having css "(.*?)" should be selected
237
-
238
- To assert that radio button not selected use any of the following steps :
239
-
240
- Then radio button having id "(.*?)" should be unselected
241
- Then radio button having name "(.*?)" should be unselected
242
- Then radio button having class "(.*?)" should be unselected
243
- Then radio button having xpath "(.*?)" should be unselected
244
- Then radio button having css "(.*?)" should be unselected
245
-
246
- To assert that radio button group selected by text use any of the following steps :
247
-
248
- Then option "(.*?)" by text from radio button group having id "(.*?)" should be selected
249
- Then option "(.*?)" by text from radio button group having name "(.*?)" should be selected
250
- Then option "(.*?)" by text from radio button group having class "(.*?)" should be selected
251
- Then option "(.*?)" by text from radio button group having xpath "(.*?)" should be selected
252
- Then option "(.*?)" by text from radio button group having css "(.*?)" should be selected
253
-
254
- To assert that radio button group selected by value use any of the following steps :
255
-
256
- Then option "(.*?)" by value from radio button group having id "(.*?)" should be selected
257
- Then option "(.*?)" by value from radio button group having name "(.*?)" should be selected
258
- Then option "(.*?)" by value from radio button group having class "(.*?)" should be selected
259
- Then option "(.*?)" by value from radio button group having xpath "(.*?)" should be selected
260
- Then option "(.*?)" by value from radio button group having css "(.*?)" should be selected
261
-
262
- To assert that radio button group not selected by text use any of the following steps :
263
-
264
- Then option "(.*?)" by text from radio button group having id "(.*?)" should be unselected
265
- Then option "(.*?)" by text from radio button group having name "(.*?)" should be unselected
266
- Then option "(.*?)" by text from radio button group having class "(.*?)" should be unselected
267
- Then option "(.*?)" by text from radio button group having xpath "(.*?)" should be unselected
268
- Then option "(.*?)" by text from radio button group having css "(.*?)" should be unselected
269
-
270
- To assert that radio button group not selected by value use any of the following steps :
271
-
272
- Then option "(.*?)" by value from radio button group having id "(.*?)" should be unselected
273
- Then option "(.*?)" by value from radio button group having name "(.*?)" should be unselected
274
- Then option "(.*?)" by value from radio button group having class "(.*?)" should be unselected
275
- Then option "(.*?)" by value from radio button group having xpath "(.*?)" should be unselected
276
- Then option "(.*?)" by value from radio button group having css "(.*?)" should be unselected
277
-
278
- #### Steps For Asserting Links
279
-
280
- To assert that link is present use following steps :
281
-
282
- Then link having text "(.*?)" should be present
283
- Then link having partial text "(.*?)" should be present
284
-
285
- To assert that link is not present use following steps :
286
-
287
- Then link having text "(.*?)" should not be present
288
- Then link having partial text "(.*?)" should not be present
289
-
290
- #### Steps For Asserting Javascript Pop-Up Alert
291
-
292
- To assert text on javascipt pop-up alert use following step :
293
-
294
- Then I should see alert text as "(.*?)"
295
-
296
- #### Steps For Asserting Difference in images
297
-
298
- To assert difference in actual image and expected image (from remotely hosted) use following steps :
299
-
300
- Then actual image having id "(.*?)" and expected image having url "(.*?)" should be similar
301
- Then actual image having name "(.*?)" and expected image having url "(.*?)" should be similar
302
- Then actual image having class "(.*?)" and expected image having url "(.*?)" should be similar
303
- Then actual image having xpath "(.*?)" and expected image having url "(.*?)" should be similar
304
- Then actual image having css "(.*?)" and expected image having url "(.*?)" should be similar
305
- Then actual image having url "(.*?)" and expected image having url "(.*?)" should be similar
306
-
307
- To assert difference in actual image and expected image (from local machine) use following steps :
308
-
309
- Then actual image having id "(.*?)" and expected image having image_name "(.*?)" should be similar
310
- Then actual image having name "(.*?)" and expected image having image_name "(.*?)" should be similar
311
- Then actual image having class "(.*?)" and expected image having image_name "(.*?)" should be similar
312
- Then actual image having xpath "(.*?)" and expected image having image_name "(.*?)" should be similar
313
- Then actual image having css "(.*?)" and expected image having image_name "(.*?)" should be similar
314
- Then actual image having url "(.*?)" and expected image having image_name "(.*?)" should be similar
315
-
316
- To assert difference in actual image and expected image (from same webpage) use following steps :
317
-
318
- Then actual image having id "(.*?)" and expected image having id "(.*?)" should be similar
319
- Then actual image having name "(.*?)" and expected image having name "(.*?)" should be similar
320
- Then actual image having class "(.*?)" and expected image having class "(.*?)" should be similar
321
- Then actual image having xpath "(.*?)" and expected image having xpath "(.*?)" should be similar
322
- Then actual image having css "(.*?)" and expected image having css "(.*?)" should be similar
323
- Then actual image having url "(.*?)" and expected image having url "(.*?)" should be similar
324
-
325
-
326
- Input Steps
327
- -----------
328
-
329
- #### Steps For TextFields
330
-
331
- To enter text into input field use following steps :
332
-
333
- Then I enter "([^\"]*)" into input field having id "([^\"]*)"
334
- Then I enter "([^\"]*)" into input field having name "([^\"]*)"
335
- Then I enter "([^\"]*)" into input field having class "([^\"]*)"
336
- Then I enter "([^\"]*)" into input field having xpath "([^\"]*)"
337
- Then I enter "([^\"]*)" into input field having css "([^\"]*)"
338
-
339
- To clear input field use following steps :
340
-
341
- Then I clear input field having id "([^\"]*)"
342
- Then I clear input field having name "([^\"]*)"
343
- Then I clear input field having class "([^\"]*)"
344
- Then I clear input field having xpath "([^\"]*)"
345
- Then I clear input field having css "([^\"]*)"
346
-
347
- #### Steps For Dropdown List
348
-
349
- To select option by text from dropdown use following steps :
350
-
351
- Then I select "(.*?)" option by text from dropdown having id "(.*?)"
352
- Then I select "(.*?)" option by text from dropdown having name "(.*?)"
353
- Then I select "(.*?)" option by text from dropdown having class "(.*?)"
354
- Then I select "(.*?)" option by text from dropdown having xpath "(.*?)"
355
- Then I select "(.*?)" option by text from dropdown having css "(.*?)"
356
-
357
- To select option by index from dropdown use following steps :
358
-
359
- Then I select (\d+) option by index from dropdown having id "(.*?)"
360
- Then I select (\d+) option by index from dropdown having name "(.*?)"
361
- Then I select (\d+) option by index from dropdown having class "(.*?)"
362
- Then I select (\d+) option by index from dropdown having xpath "(.*?)"
363
- Then I select (\d+) option by index from dropdown having css "(.*?)"
364
-
365
- To select option by value from dropdown use following steps :
366
-
367
- Then I select "(.*?)" option by value from dropdown having id "(.*?)"
368
- Then I select "(.*?)" option by value from dropdown having name "(.*?)"
369
- Then I select "(.*?)" option by value from dropdown having class "(.*?)"
370
- Then I select "(.*?)" option by value from dropdown having xpath "(.*?)"
371
- Then I select "(.*?)" option by value from dropdown having css "(.*?)"
372
-
373
- #### Steps For Multiselect List
374
-
375
- To select option by text from multiselect dropdown use following steps :
376
-
377
- Then I select "(.*?)" option by text from multiselect dropdown having id "(.*?)"
378
- Then I select "(.*?)" option by text from multiselect dropdown having name "(.*?)"
379
- Then I select "(.*?)" option by text from multiselect dropdown having class "(.*?)"
380
- Then I select "(.*?)" option by text from multiselect dropdown having xpath "(.*?)"
381
- Then I select "(.*?)" option by text from multiselect dropdown having css "(.*?)"
382
-
383
- To select option by index from multiselect dropdown use following steps :
384
-
385
- Then I select (\d+) option by index from multiselect dropdown having id "(.*?)"
386
- Then I select (\d+) option by index from multiselect dropdown having name "(.*?)"
387
- Then I select (\d+) option by index from multiselect dropdown having class "(.*?)"
388
- Then I select (\d+) option by index from multiselect dropdown having xpath "(.*?)"
389
- Then I select (\d+) option by index from multiselect dropdown having css "(.*?)"
390
-
391
- To select option by value from multiselect dropdown use following steps :
392
-
393
- Then I select "(.*?)" option by value from multiselect dropdown having id "(.*?)"
394
- Then I select "(.*?)" option by value from multiselect dropdown having name "(.*?)"
395
- Then I select "(.*?)" option by value from multiselect dropdown having class "(.*?)"
396
- Then I select "(.*?)" option by value from multiselect dropdown having xpath "(.*?)"
397
- Then I select "(.*?)" option by value from multiselect dropdown having css "(.*?)"
398
-
399
- To select all options from multiselect use following steps :
400
-
401
- Then I select all options from multiselect dropdown having id "(.*?)"
402
- Then I select all options from multiselect dropdown having name "(.*?)"
403
- Then I select all options from multiselect dropdown having class "(.*?)"
404
- Then I select all options from multiselect dropdown having xpath "(.*?)"
405
- Then I select all options from multiselect dropdown having css "(.*?)"
406
-
407
- To unselect all options from multiselect use following steps :
408
-
409
- Then I unselect all options from mutliselect dropdown having id "(.*?)"
410
- Then I unselect all options from mutliselect dropdown having name "(.*?)"
411
- Then I unselect all options from mutliselect dropdown having class "(.*?)"
412
- Then I unselect all options from mutliselect dropdown having xpath "(.*?)"
413
- Then I unselect all options from mutliselect dropdown having css "(.*?)"
414
-
415
- #### Steps For Checkboxes
416
-
417
- To check the checkbox use following steps :
418
-
419
- Then I check the checkbox having id "(.*?)"
420
- Then I check the checkbox having name "(.*?)"
421
- Then I check the checkbox having class "(.*?)"
422
- Then I check the checkbox having xpath "(.*?)"
423
- Then I check the checkbox having css "(.*?)"
424
-
425
- To uncheck the checkbox use following steps :
426
-
427
- Then I uncheck the checkbox having id "(.*?)"
428
- Then I uncheck the checkbox having name "(.*?)"
429
- Then I uncheck the checkbox having class "(.*?)"
430
- Then I uncheck the checkbox having xpath "(.*?)"
431
- Then I uncheck the checkbox having css "(.*?)"
432
-
433
- To toggle checkbox use following steps
434
-
435
- Then I toggle checkbox having id "(.*?)"
436
- Then I toggle checkbox having name "(.*?)"
437
- Then I toggle checkbox having class "(.*?)"
438
- Then I toggle checkbox having xpath "(.*?)"
439
- Then I toggle checkbox having css "(.*?)"
440
-
441
- #### Steps For Radio Buttons
442
-
443
- To select radio button use following steps :
444
-
445
- Then I select radio button having id "(.*?)"
446
- Then I select radio button having name "(.*?)"
447
- Then I select radio button having class "(.*?)"
448
- Then I select radio button having xpath "(.*?)"
449
- Then I select radio button having css "(.*?)"
450
-
451
-
452
- To select one radio button by text from radio button group use following steps :
453
-
454
- Then I select "(.*?)" option by text from radio button group having id "(.*?)"
455
- Then I select "(.*?)" option by text from radio button group having name "(.*?)"
456
- Then I select "(.*?)" option by text from radio button group having class "(.*?)"
457
- Then I select "(.*?)" option by text from radio button group having xpath "(.*?)"
458
- Then I select "(.*?)" option by text from radio button group having css "(.*?)"
459
-
460
- To select one radio button by value from radio button group use following steps :
461
-
462
- Then I select "(.*?)" option by value from radio button group having id "(.*?)"
463
- Then I select "(.*?)" option by value from radio button group having name "(.*?)"
464
- Then I select "(.*?)" option by value from radio button group having class "(.*?)"
465
- Then I select "(.*?)" option by value from radio button group having xpath "(.*?)"
466
- Then I select "(.*?)" option by value from radio button group having css "(.*?)"
467
-
468
-
469
- Click Steps
470
- -----------
471
- To click on web element use following steps :
472
-
473
- Then I click on element having id "(.*?)"
474
- Then I click on element having name "(.*?)"
475
- Then I click on element having class "(.*?)"
476
- Then I click on element having xpath "(.*?)"
477
- Then I click on element having css "(.*?)"
478
-
479
- To forcefully click on web element use following steps (if above steps do not work) :
480
-
481
- Then I forcefully click on element having id "(.*?)"
482
- Then I forcefully click on element having name "(.*?)"
483
- Then I forcefully click on element having class "(.*?)"
484
- Then I forcefully click on element having xpath "(.*?)"
485
- Then I forcefully click on element having css "(.*?)"
486
-
487
- To double click on web element use following steps :
488
-
489
- Then I double click on element having id "(.*?)"
490
- Then I double click on element having name "(.*?)"
491
- Then I double click on element having class "(.*?)"
492
- Then I double click on element having xpath "(.*?)"
493
- Then I double click on element having css "(.*?)"
494
-
495
- To click on links use following steps :
496
-
497
- Then I click on link having text "(.*?)"
498
- Then I click on link having partial text "(.*?)"
499
-
500
- Progress Steps
501
- --------------
502
- To wait for specific time use following step :
503
-
504
- Then I wait for (\d+) sec
505
-
506
- To wait for specific element to display use following steps :
507
-
508
- Then I wait (\d+) seconds for element having id "(.*?)" to display
509
- Then I wait (\d+) seconds for element having name "(.*?)" to display
510
- Then I wait (\d+) seconds for element having class "(.*?)" to display
511
- Then I wait (\d+) seconds for element having xpath "(.*?)" to display
512
- Then I wait (\d+) seconds for element having css "(.*?)" to display
513
-
514
- To wait for specific element to enable use following steps :
515
-
516
- Then I wait (\d+) seconds for element having id "(.*?)" to enable
517
- Then I wait (\d+) seconds for element having name "(.*?)" to enable
518
- Then I wait (\d+) seconds for element having class "(.*?)" to enable
519
- Then I wait (\d+) seconds for element having xpath "(.*?)" to enable
520
- Then I wait (\d+) seconds for element having css "(.*?)" to enable
521
-
522
- Javascript Handling Steps
523
- -------------------------
524
- To handle javascript pop-up use following steps :
525
-
526
- Then I accept alert
527
- Then I dismiss alert
528
-
529
-
530
- Screenshot Steps
531
- ----------------
532
- To take screenshot use following step :
533
-
534
- Then I take screenshot
535
-
536
-
537
- Configuration Steps
538
- -------------------
539
- To print testing configuration use following step :
540
-
541
- Then I print configuration
542
-
543
- ## Mobile Steps
544
-
545
-
546
- ### Tap Steps
547
- -----------
548
- To tap on app element use following steps :
549
-
550
- Then I tap on element having id "(.*?)"
551
- Then I tap on element having name "(.*?)"
552
- Then I tap on element having class "(.*?)"
553
- Then I tap on element having xpath "(.*?)"
554
- Then I tap on element having css "(.*?)"
555
-
556
- To Tap on back button of device use following step :
557
-
558
- Then I tap on back button of device
559
- Then I press back button of device
560
-
561
- ### Gesture Steps
562
- ------------
563
- To perform gesture operations on device
564
-
565
- ### Swipe steps
566
- ------------
567
- To perform swipe using app elements use following steps :
568
-
569
- Then I swipe from element having id "(.*?)" to element having id "(.*?)"
570
- Then I swipe from element having id "(.*?)" to element having name "(.*?)"
571
- Then I swipe from element having id "(.*?)" to element having class "(.*?)"
572
- Then I swipe from element having id "(.*?)" to element having xpath "(.*?)"
573
-
574
- Then I swipe from element having name "(.*?)" to element having id "(.*?)"
575
- Then I swipe from element having name "(.*?)" to element having name "(.*?)"
576
- Then I swipe from element having name "(.*?)" to element having class "(.*?)"
577
- Then I swipe from element having name "(.*?)" to element having xpath "(.*?)"
578
-
579
- Then I swipe from element having class "(.*?)" to element having id "(.*?)"
580
- Then I swipe from element having class "(.*?)" to element having name "(.*?)"
581
- Then I swipe from element having class "(.*?)" to element having class "(.*?)"
582
- Then I swipe from element having class "(.*?)" to element having xpath "(.*?)"
583
-
584
- Then I swipe from element having xpath "(.*?)" to element having id "(.*?)"
585
- Then I swipe from element having xpath "(.*?)" to element having name "(.*?)"
586
- Then I swipe from element having xpath "(.*?)" to element having class "(.*?)"
587
- Then I swipe from element having xpath "(.*?)" to element having xpath "(.*?)"
588
-
589
- To perform swipe using co-ordinates
590
-
591
- Then I swipe from co-ordinates "(.*?)","(.*?)" to co-ordinates "(.*?)","(.*?)"
592
-
593
- To perform swipe using direction
594
-
595
- Then I swipe right
596
- Then I swipe left
597
- Then I swipe up
598
- Then I swipe down
599
-
600
- To perform swipe using app element with direction use following steps :
601
-
602
- Then I swipe element having id "(.*?)" to right
603
- Then I swipe element having name "(.*?)" to right
604
- Then I swipe element having class "(.*?)" to right
605
- Then I swipe element having xpath "(.*?)" to right
606
-
607
- Then I swipe element having id "(.*?)" to left
608
- Then I swipe element having name "(.*?)" to left
609
- Then I swipe element having class "(.*?)" to left
610
- Then I swipe element having xpath "(.*?)" to left
611
-
612
- Then I swipe element having id "(.*?)" to up
613
- Then I swipe element having name "(.*?)" to up
614
- Then I swipe element having class "(.*?)" to up
615
- Then I swipe element having xpath "(.*?)" to up
616
-
617
- Then I swipe element having id "(.*?)" to down
618
- Then I swipe element having name "(.*?)" to down
619
- Then I swipe element having class "(.*?)" to down
620
- Then I swipe element having xpath "(.*?)" to down
621
-
622
- To perform swipe using co-ordinates with direction use following steps :
623
-
624
- Then I swipe co-ordinates "(.*?)","(.*?)" to left
625
- Then I swipe co-ordinates "(.*?)","(.*?)" to right
626
- Then I swipe co-ordinates "(.*?)","(.*?)" to up
627
- Then I swipe co-ordinates "(.*?)","(.*?)" to down
628
-
629
-
630
- ### long tap steps
631
- ------------
632
- To perform long tap with default duration of 2 seconds on app elements use following steps :
633
-
634
- Then I long tap on element having id "(.*?)"
635
- Then I long tap on element having name "(.*?)"
636
- Then I long tap on element having class "(.*?)"
637
- Then I long tap on element having xpath "(.*?)"
638
-
639
- To perform long tap with customized duration of seconds on app elements use following steps :
640
-
641
- Then I long tap on element having id "(.*?)" for "(.*?)" sec
642
- Then I long tap on element having name "(.*?)" for "(.*?)" sec
643
- Then I long tap on element having class "(.*?)" for "(.*?)" sec
644
- Then I long tap on element having xpath "(.*?)" for "(.*?)" sec
645
-
646
- To perform long tap with default duration of 2 seconds using co-ordinates use following step :
647
-
648
- Then I long tap on co\-ordinate "(.*?)","(.*?)
649
-
650
- To perform long tap with customized duration of seconds using co-ordinates use following step :
651
-
652
- Then I long tap on co\-ordinate "(.*?)","(.*?)" for "(.*?)" sec
653
-
654
- ### Close app step
655
-
656
- Then I close app
1
+ # Canned Steps
2
+
3
+ selenium-cucumber comes with the following set of predefined steps.
4
+ You can add your own steps or change the ones you see here.
5
+
6
+
7
+ * [Navigation Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#navigation-steps)
8
+ * [Assertion Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#assertion-steps)
9
+ * [Input Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#input-steps)
10
+ * [Click Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#click-steps)
11
+ * [Progress Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#progress-steps)
12
+ * [Screenshot Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#screenshot-steps)
13
+ * [Configuration Steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#configuration-steps)
14
+ * [Mobile steps](https://github.com/selenium-cucumber/selenium-cucumber-ruby/blob/master/doc/canned_steps.md#mobile-steps)
15
+
16
+
17
+
18
+ ## Navigation Steps
19
+
20
+ To open/close URL and to navigate between pages use following steps :
21
+
22
+ Then I navigate to "([^\"]*)"
23
+ Then I navigate forward
24
+ Then I navigate back
25
+ Then I refresh page
26
+
27
+ To switch between windows use following steps :
28
+
29
+ Then I switch to new window
30
+ Then I switch to previous window
31
+ Then I switch to window having title "(.*?)"
32
+ Then I close new window
33
+ Then I switch to main window
34
+
35
+ To switch between frames use following steps :
36
+
37
+ Then I switch to frame "(.*?)"
38
+ Then I switch to main content
39
+
40
+ To interact with browser use following steps :
41
+
42
+ Then I resize browser window size to width (\d+) and height (\d+)
43
+ Then I maximize browser window
44
+ Then I close browser
45
+
46
+ To zoom in/out webpage use following steps :
47
+
48
+ Then I zoom in page
49
+ Then I zoom out page
50
+
51
+ To zoom out webpage till necessary element displays use following steps :
52
+
53
+ Then I zoom out page till I see element having id "(.*?)"
54
+ Then I zoom out page till I see element having name "(.*?)"
55
+ Then I zoom out page till I see element having class "(.*?)"
56
+ Then I zoom out page till I see element having xpath "(.*?)"
57
+ Then I zoom out page till I see element having css "(.*?)"
58
+
59
+ To reset webpage view use following step :
60
+
61
+ Then I reset page view
62
+
63
+ To scroll webpage use following steps :
64
+
65
+ Then I scroll to top of page
66
+ Then I scroll to end of page
67
+
68
+ To scroll webpage to specific element use following steps :
69
+
70
+ Then I scroll to element having id "(.*?)"
71
+ Then I scroll to element having name "(.*?)"
72
+ Then I scroll to element having class "(.*?)"
73
+ Then I scroll to element having xpath "(.*?)"
74
+ Then I scroll to element having css "(.*?)"
75
+
76
+ To hover over a element use following steps :
77
+
78
+ Then I hover over element having id "(.*?)"
79
+ Then I hover over element having name "(.*?)"
80
+ Then I hover over element having class "(.*?)"
81
+ Then I hover over element having xpath "(.*?)"
82
+ Then I hover over element having css "(.*?)"
83
+
84
+
85
+ Assertion Steps
86
+ ---------------
87
+ To assert that page title can be found use following step :
88
+
89
+ Then I should see page title as "(.*?)"
90
+ Then I should not see page title as "(.*?)"
91
+
92
+ Then I should see page title having partial text as "(.*?)"
93
+ Then I should not see page title having partial text as "(.*?)"
94
+
95
+ #### Steps For Asserting Element Text
96
+
97
+ To assert element text use any of the following steps :
98
+
99
+ Then element having id "([^\"]*)" should have text as "(.*?)"
100
+ Then element having name "([^\"]*)" should have text as "(.*?)"
101
+ Then element having class "([^\"]*)" should have text as "(.*?)"
102
+ Then element having xpath "([^\"]*)" should have text as "(.*?)"
103
+ Then element having css "([^\"]*)" should have text as "(.*?)"
104
+
105
+ Then element having id "([^\"]*)" should have partial text as "(.*?)"
106
+ Then element having name "([^\"]*)" should have partial text as "(.*?)"
107
+ Then element having class "([^\"]*)" should have partial text as "(.*?)"
108
+ Then element having xpath "([^\"]*)" should have partial text as "(.*?)"
109
+ Then element having css "([^\"]*)" should have partial text as "(.*?)"
110
+
111
+ Then element having id "([^\"]*)" should not have text as "(.*?)"
112
+ Then element having name "([^\"]*)" should not have text as "(.*?)"
113
+ Then element having class "([^\"]*)" should not have text as "(.*?)"
114
+ Then element having xpath "([^\"]*)" should not have text as "(.*?)"
115
+ Then element having css "([^\"]*)" should not have text as "(.*?)"
116
+
117
+ Then element having id "([^\"]*)" should not have partial text as "(.*?)"
118
+ Then element having name "([^\"]*)" should not have partial text as "(.*?)"
119
+ Then element having class "([^\"]*)" should not have partial text as "(.*?)"
120
+ Then element having xpath "([^\"]*)" should not have partial text as "(.*?)"
121
+ Then element having css "([^\"]*)" should not have partial text as "(.*?)"
122
+
123
+ #### Steps For Asserting Element Attribute
124
+
125
+ To assert element attribute use any of the following steps :
126
+
127
+ Then element having id "([^\"]*)" should have attribute "(.*?)" with value "(.*?)"
128
+ Then element having name "([^\"]*)" should have attribute "(.*?)" with value "(.*?)"
129
+ Then element having class "([^\"]*)" should have attribute "(.*?)" with value "(.*?)"
130
+ Then element having xpath "([^\"]*)" should have attribute "(.*?)" with value "(.*?)"
131
+ Then element having css "([^\"]*)" should have attribute "(.*?)" with value "(.*?)"
132
+
133
+ Then element having id "([^\"]*)" should not have attribute "(.*?)" with value "(.*?)"
134
+ Then element having name "([^\"]*)" should not have attribute "(.*?)" with value "(.*?)"
135
+ Then element having class "([^\"]*)" should not have attribute "(.*?)" with value "(.*?)"
136
+ Then element having xpath "([^\"]*)" should not have attribute "(.*?)" with value "(.*?)"
137
+ Then element having css "([^\"]*)" should not have attribute "(.*?)" with value "(.*?)"
138
+
139
+
140
+ #### Steps For Asserting Element Accesibility
141
+
142
+ To assert that element is enabled use any of the following steps :
143
+
144
+ Then element having id "([^\"]*)" should be enabled
145
+ Then element having name "([^\"]*)" should be enabled
146
+ Then element having class "([^\"]*)" should be enabled
147
+ Then element having xpath "([^\"]*)" should be enabled
148
+ Then element having css "([^\"]*)" should be enabled
149
+
150
+ To assert that element is disabled use any of the following steps :
151
+
152
+ Then element having id "([^\"]*)" should be disabled
153
+ Then element having name "([^\"]*)" should be disabled
154
+ Then element having class "([^\"]*)" should be disabled
155
+ Then element having xpath "([^\"]*)" should be disabled
156
+ Then element having css "([^\"]*)" should be disabled
157
+
158
+ #### Steps For Asserting Element Visibility
159
+
160
+ To assert that element is present use any of the following steps :
161
+
162
+ Then element having id "([^\"]*)" should be present
163
+ Then element having name "([^\"]*)" should be present
164
+ Then element having class "([^\"]*)" should be present
165
+ Then element having xpath "([^\"]*)" should be present
166
+ Then element having css "([^\"]*)" should be present
167
+
168
+ To assert that element is not present use any of the following steps:
169
+
170
+ Then element having id "([^\"]*)" should not be present
171
+ Then element having name "([^\"]*)" should not be present
172
+ Then element having class "([^\"]*)" should not be present
173
+ Then element having xpath "([^\"]*)" should not be present
174
+ Then element having css "([^\"]*)" should not be present
175
+
176
+ #### Steps For Asserting Checkbox
177
+
178
+ To assert that checkbox is checked use any of the following steps :
179
+
180
+ Then checkbox having id "(.*?)" should be checked
181
+ Then checkbox having name "(.*?)" should be checked
182
+ Then checkbox having class "(.*?)" should be checked
183
+ Then checkbox having xpath "(.*?)" should be checked
184
+ Then checkbox having css "(.*?)" should be checked
185
+
186
+ To assert that checkbox is unchecked use any of the following steps :
187
+
188
+ Then checkbox having id "(.*?)" should be unchecked
189
+ Then checkbox having name "(.*?)" should be unchecked
190
+ Then checkbox having class "(.*?)" should be unchecked
191
+ Then checkbox having xpath "(.*?)" should be unchecked
192
+ Then checkbox having css "(.*?)" should be unchecked
193
+
194
+ #### Steps For Asserting Dropdown List
195
+
196
+ To assert that option by text from dropdown list selected use following steps :
197
+
198
+ Then option "(.*?)" by text from dropdown having id "(.*?)" should be selected
199
+ Then option "(.*?)" by text from dropdown having name "(.*?)" should be selected
200
+ Then option "(.*?)" by text from dropdown having class "(.*?)" should be selected
201
+ Then option "(.*?)" by text from dropdown having xpath "(.*?)" should be selected
202
+ Then option "(.*?)" by text from dropdown having css "(.*?)" should be selected
203
+
204
+ To assert that option by value from dropdown list selected use following steps :
205
+
206
+ Then option "(.*?)" by value from dropdown having id "(.*?)" should be selected
207
+ Then option "(.*?)" by value from dropdown having name "(.*?)" should be selected
208
+ Then option "(.*?)" by value from dropdown having class "(.*?)" should be selected
209
+ Then option "(.*?)" by value from dropdown having xpath "(.*?)" should be selected
210
+ Then option "(.*?)" by value from dropdown having css "(.*?)" should be selected
211
+
212
+ To assert that option by text from dropdown list unselected use following steps :
213
+
214
+ Then option "(.*?)" by text from dropdown having id "(.*?)" should be unselected
215
+ Then option "(.*?)" by text from dropdown having name "(.*?)" should be unselected
216
+ Then option "(.*?)" by text from dropdown having class "(.*?)" should be unselected
217
+ Then option "(.*?)" by text from dropdown having xpath "(.*?)" should be unselected
218
+ Then option "(.*?)" by text from dropdown having css "(.*?)" should be unselected
219
+
220
+ To assert that option by value from dropdown list unselected use following steps :
221
+
222
+ Then option "(.*?)" by value from dropdown having id "(.*?)" should be unselected
223
+ Then option "(.*?)" by value from dropdown having name "(.*?)" should be unselected
224
+ Then option "(.*?)" by value from dropdown having class "(.*?)" should be unselected
225
+ Then option "(.*?)" by value from dropdown having xpath "(.*?)" should be unselected
226
+ Then option "(.*?)" by value from dropdown having css "(.*?)" should be unselected
227
+
228
+ #### Steps For Asserting Radio Button
229
+
230
+ To assert that radio button selected use any of the following steps :
231
+
232
+ Then radio button having id "(.*?)" should be selected
233
+ Then radio button having name "(.*?)" should be selected
234
+ Then radio button having class "(.*?)" should be selected
235
+ Then radio button having xpath "(.*?)" should be selected
236
+ Then radio button having css "(.*?)" should be selected
237
+
238
+ To assert that radio button not selected use any of the following steps :
239
+
240
+ Then radio button having id "(.*?)" should be unselected
241
+ Then radio button having name "(.*?)" should be unselected
242
+ Then radio button having class "(.*?)" should be unselected
243
+ Then radio button having xpath "(.*?)" should be unselected
244
+ Then radio button having css "(.*?)" should be unselected
245
+
246
+ To assert that radio button group selected by text use any of the following steps :
247
+
248
+ Then option "(.*?)" by text from radio button group having id "(.*?)" should be selected
249
+ Then option "(.*?)" by text from radio button group having name "(.*?)" should be selected
250
+ Then option "(.*?)" by text from radio button group having class "(.*?)" should be selected
251
+ Then option "(.*?)" by text from radio button group having xpath "(.*?)" should be selected
252
+ Then option "(.*?)" by text from radio button group having css "(.*?)" should be selected
253
+
254
+ To assert that radio button group selected by value use any of the following steps :
255
+
256
+ Then option "(.*?)" by value from radio button group having id "(.*?)" should be selected
257
+ Then option "(.*?)" by value from radio button group having name "(.*?)" should be selected
258
+ Then option "(.*?)" by value from radio button group having class "(.*?)" should be selected
259
+ Then option "(.*?)" by value from radio button group having xpath "(.*?)" should be selected
260
+ Then option "(.*?)" by value from radio button group having css "(.*?)" should be selected
261
+
262
+ To assert that radio button group not selected by text use any of the following steps :
263
+
264
+ Then option "(.*?)" by text from radio button group having id "(.*?)" should be unselected
265
+ Then option "(.*?)" by text from radio button group having name "(.*?)" should be unselected
266
+ Then option "(.*?)" by text from radio button group having class "(.*?)" should be unselected
267
+ Then option "(.*?)" by text from radio button group having xpath "(.*?)" should be unselected
268
+ Then option "(.*?)" by text from radio button group having css "(.*?)" should be unselected
269
+
270
+ To assert that radio button group not selected by value use any of the following steps :
271
+
272
+ Then option "(.*?)" by value from radio button group having id "(.*?)" should be unselected
273
+ Then option "(.*?)" by value from radio button group having name "(.*?)" should be unselected
274
+ Then option "(.*?)" by value from radio button group having class "(.*?)" should be unselected
275
+ Then option "(.*?)" by value from radio button group having xpath "(.*?)" should be unselected
276
+ Then option "(.*?)" by value from radio button group having css "(.*?)" should be unselected
277
+
278
+ #### Steps For Asserting Links
279
+
280
+ To assert that link is present use following steps :
281
+
282
+ Then link having text "(.*?)" should be present
283
+ Then link having partial text "(.*?)" should be present
284
+
285
+ To assert that link is not present use following steps :
286
+
287
+ Then link having text "(.*?)" should not be present
288
+ Then link having partial text "(.*?)" should not be present
289
+
290
+ #### Steps For Asserting Javascript Pop-Up Alert
291
+
292
+ To assert text on javascipt pop-up alert use following step :
293
+
294
+ Then I should see alert text as "(.*?)"
295
+
296
+ #### Steps For Asserting Difference in images
297
+
298
+ To assert difference in actual image and expected image (from remotely hosted) use following steps :
299
+
300
+ Then actual image having id "(.*?)" and expected image having url "(.*?)" should be similar
301
+ Then actual image having name "(.*?)" and expected image having url "(.*?)" should be similar
302
+ Then actual image having class "(.*?)" and expected image having url "(.*?)" should be similar
303
+ Then actual image having xpath "(.*?)" and expected image having url "(.*?)" should be similar
304
+ Then actual image having css "(.*?)" and expected image having url "(.*?)" should be similar
305
+ Then actual image having url "(.*?)" and expected image having url "(.*?)" should be similar
306
+
307
+ To assert difference in actual image and expected image (from local machine) use following steps :
308
+
309
+ Then actual image having id "(.*?)" and expected image having image_name "(.*?)" should be similar
310
+ Then actual image having name "(.*?)" and expected image having image_name "(.*?)" should be similar
311
+ Then actual image having class "(.*?)" and expected image having image_name "(.*?)" should be similar
312
+ Then actual image having xpath "(.*?)" and expected image having image_name "(.*?)" should be similar
313
+ Then actual image having css "(.*?)" and expected image having image_name "(.*?)" should be similar
314
+ Then actual image having url "(.*?)" and expected image having image_name "(.*?)" should be similar
315
+
316
+ To assert difference in actual image and expected image (from same webpage) use following steps :
317
+
318
+ Then actual image having id "(.*?)" and expected image having id "(.*?)" should be similar
319
+ Then actual image having name "(.*?)" and expected image having name "(.*?)" should be similar
320
+ Then actual image having class "(.*?)" and expected image having class "(.*?)" should be similar
321
+ Then actual image having xpath "(.*?)" and expected image having xpath "(.*?)" should be similar
322
+ Then actual image having css "(.*?)" and expected image having css "(.*?)" should be similar
323
+ Then actual image having url "(.*?)" and expected image having url "(.*?)" should be similar
324
+
325
+
326
+ Input Steps
327
+ -----------
328
+
329
+ #### Steps For TextFields
330
+
331
+ To enter text into input field use following steps :
332
+
333
+ Then I enter "([^\"]*)" into input field having id "([^\"]*)"
334
+ Then I enter "([^\"]*)" into input field having name "([^\"]*)"
335
+ Then I enter "([^\"]*)" into input field having class "([^\"]*)"
336
+ Then I enter "([^\"]*)" into input field having xpath "([^\"]*)"
337
+ Then I enter "([^\"]*)" into input field having css "([^\"]*)"
338
+
339
+ To clear input field use following steps :
340
+
341
+ Then I clear input field having id "([^\"]*)"
342
+ Then I clear input field having name "([^\"]*)"
343
+ Then I clear input field having class "([^\"]*)"
344
+ Then I clear input field having xpath "([^\"]*)"
345
+ Then I clear input field having css "([^\"]*)"
346
+
347
+ #### Steps For Dropdown List
348
+
349
+ To select option by text from dropdown use following steps :
350
+
351
+ Then I select "(.*?)" option by text from dropdown having id "(.*?)"
352
+ Then I select "(.*?)" option by text from dropdown having name "(.*?)"
353
+ Then I select "(.*?)" option by text from dropdown having class "(.*?)"
354
+ Then I select "(.*?)" option by text from dropdown having xpath "(.*?)"
355
+ Then I select "(.*?)" option by text from dropdown having css "(.*?)"
356
+
357
+ To select option by index from dropdown use following steps :
358
+
359
+ Then I select (\d+) option by index from dropdown having id "(.*?)"
360
+ Then I select (\d+) option by index from dropdown having name "(.*?)"
361
+ Then I select (\d+) option by index from dropdown having class "(.*?)"
362
+ Then I select (\d+) option by index from dropdown having xpath "(.*?)"
363
+ Then I select (\d+) option by index from dropdown having css "(.*?)"
364
+
365
+ To select option by value from dropdown use following steps :
366
+
367
+ Then I select "(.*?)" option by value from dropdown having id "(.*?)"
368
+ Then I select "(.*?)" option by value from dropdown having name "(.*?)"
369
+ Then I select "(.*?)" option by value from dropdown having class "(.*?)"
370
+ Then I select "(.*?)" option by value from dropdown having xpath "(.*?)"
371
+ Then I select "(.*?)" option by value from dropdown having css "(.*?)"
372
+
373
+ #### Steps For Multiselect List
374
+
375
+ To select option by text from multiselect dropdown use following steps :
376
+
377
+ Then I select "(.*?)" option by text from multiselect dropdown having id "(.*?)"
378
+ Then I select "(.*?)" option by text from multiselect dropdown having name "(.*?)"
379
+ Then I select "(.*?)" option by text from multiselect dropdown having class "(.*?)"
380
+ Then I select "(.*?)" option by text from multiselect dropdown having xpath "(.*?)"
381
+ Then I select "(.*?)" option by text from multiselect dropdown having css "(.*?)"
382
+
383
+ To select option by index from multiselect dropdown use following steps :
384
+
385
+ Then I select (\d+) option by index from multiselect dropdown having id "(.*?)"
386
+ Then I select (\d+) option by index from multiselect dropdown having name "(.*?)"
387
+ Then I select (\d+) option by index from multiselect dropdown having class "(.*?)"
388
+ Then I select (\d+) option by index from multiselect dropdown having xpath "(.*?)"
389
+ Then I select (\d+) option by index from multiselect dropdown having css "(.*?)"
390
+
391
+ To select option by value from multiselect dropdown use following steps :
392
+
393
+ Then I select "(.*?)" option by value from multiselect dropdown having id "(.*?)"
394
+ Then I select "(.*?)" option by value from multiselect dropdown having name "(.*?)"
395
+ Then I select "(.*?)" option by value from multiselect dropdown having class "(.*?)"
396
+ Then I select "(.*?)" option by value from multiselect dropdown having xpath "(.*?)"
397
+ Then I select "(.*?)" option by value from multiselect dropdown having css "(.*?)"
398
+
399
+ To select all options from multiselect use following steps :
400
+
401
+ Then I select all options from multiselect dropdown having id "(.*?)"
402
+ Then I select all options from multiselect dropdown having name "(.*?)"
403
+ Then I select all options from multiselect dropdown having class "(.*?)"
404
+ Then I select all options from multiselect dropdown having xpath "(.*?)"
405
+ Then I select all options from multiselect dropdown having css "(.*?)"
406
+
407
+ To unselect all options from multiselect use following steps :
408
+
409
+ Then I unselect all options from mutliselect dropdown having id "(.*?)"
410
+ Then I unselect all options from mutliselect dropdown having name "(.*?)"
411
+ Then I unselect all options from mutliselect dropdown having class "(.*?)"
412
+ Then I unselect all options from mutliselect dropdown having xpath "(.*?)"
413
+ Then I unselect all options from mutliselect dropdown having css "(.*?)"
414
+
415
+ #### Steps For Checkboxes
416
+
417
+ To check the checkbox use following steps :
418
+
419
+ Then I check the checkbox having id "(.*?)"
420
+ Then I check the checkbox having name "(.*?)"
421
+ Then I check the checkbox having class "(.*?)"
422
+ Then I check the checkbox having xpath "(.*?)"
423
+ Then I check the checkbox having css "(.*?)"
424
+
425
+ To uncheck the checkbox use following steps :
426
+
427
+ Then I uncheck the checkbox having id "(.*?)"
428
+ Then I uncheck the checkbox having name "(.*?)"
429
+ Then I uncheck the checkbox having class "(.*?)"
430
+ Then I uncheck the checkbox having xpath "(.*?)"
431
+ Then I uncheck the checkbox having css "(.*?)"
432
+
433
+ To toggle checkbox use following steps
434
+
435
+ Then I toggle checkbox having id "(.*?)"
436
+ Then I toggle checkbox having name "(.*?)"
437
+ Then I toggle checkbox having class "(.*?)"
438
+ Then I toggle checkbox having xpath "(.*?)"
439
+ Then I toggle checkbox having css "(.*?)"
440
+
441
+ #### Steps For Radio Buttons
442
+
443
+ To select radio button use following steps :
444
+
445
+ Then I select radio button having id "(.*?)"
446
+ Then I select radio button having name "(.*?)"
447
+ Then I select radio button having class "(.*?)"
448
+ Then I select radio button having xpath "(.*?)"
449
+ Then I select radio button having css "(.*?)"
450
+
451
+
452
+ To select one radio button by text from radio button group use following steps :
453
+
454
+ Then I select "(.*?)" option by text from radio button group having id "(.*?)"
455
+ Then I select "(.*?)" option by text from radio button group having name "(.*?)"
456
+ Then I select "(.*?)" option by text from radio button group having class "(.*?)"
457
+ Then I select "(.*?)" option by text from radio button group having xpath "(.*?)"
458
+ Then I select "(.*?)" option by text from radio button group having css "(.*?)"
459
+
460
+ To select one radio button by value from radio button group use following steps :
461
+
462
+ Then I select "(.*?)" option by value from radio button group having id "(.*?)"
463
+ Then I select "(.*?)" option by value from radio button group having name "(.*?)"
464
+ Then I select "(.*?)" option by value from radio button group having class "(.*?)"
465
+ Then I select "(.*?)" option by value from radio button group having xpath "(.*?)"
466
+ Then I select "(.*?)" option by value from radio button group having css "(.*?)"
467
+
468
+
469
+ Click Steps
470
+ -----------
471
+ To click on web element use following steps :
472
+
473
+ Then I click on element having id "(.*?)"
474
+ Then I click on element having name "(.*?)"
475
+ Then I click on element having class "(.*?)"
476
+ Then I click on element having xpath "(.*?)"
477
+ Then I click on element having css "(.*?)"
478
+
479
+ To forcefully click on web element use following steps (if above steps do not work) :
480
+
481
+ Then I forcefully click on element having id "(.*?)"
482
+ Then I forcefully click on element having name "(.*?)"
483
+ Then I forcefully click on element having class "(.*?)"
484
+ Then I forcefully click on element having xpath "(.*?)"
485
+ Then I forcefully click on element having css "(.*?)"
486
+
487
+ To double click on web element use following steps :
488
+
489
+ Then I double click on element having id "(.*?)"
490
+ Then I double click on element having name "(.*?)"
491
+ Then I double click on element having class "(.*?)"
492
+ Then I double click on element having xpath "(.*?)"
493
+ Then I double click on element having css "(.*?)"
494
+
495
+ To click on links use following steps :
496
+
497
+ Then I click on link having text "(.*?)"
498
+ Then I click on link having partial text "(.*?)"
499
+
500
+ Progress Steps
501
+ --------------
502
+ To wait for specific time use following step :
503
+
504
+ Then I wait for (\d+) sec
505
+
506
+ To wait for specific element to display use following steps :
507
+
508
+ Then I wait (\d+) seconds for element having id "(.*?)" to display
509
+ Then I wait (\d+) seconds for element having name "(.*?)" to display
510
+ Then I wait (\d+) seconds for element having class "(.*?)" to display
511
+ Then I wait (\d+) seconds for element having xpath "(.*?)" to display
512
+ Then I wait (\d+) seconds for element having css "(.*?)" to display
513
+
514
+ To wait for specific element to enable use following steps :
515
+
516
+ Then I wait (\d+) seconds for element having id "(.*?)" to enable
517
+ Then I wait (\d+) seconds for element having name "(.*?)" to enable
518
+ Then I wait (\d+) seconds for element having class "(.*?)" to enable
519
+ Then I wait (\d+) seconds for element having xpath "(.*?)" to enable
520
+ Then I wait (\d+) seconds for element having css "(.*?)" to enable
521
+
522
+ Javascript Handling Steps
523
+ -------------------------
524
+ To handle javascript pop-up use following steps :
525
+
526
+ Then I accept alert
527
+ Then I dismiss alert
528
+
529
+
530
+ Screenshot Steps
531
+ ----------------
532
+ To take screenshot use following step :
533
+
534
+ Then I take screenshot
535
+
536
+
537
+ Configuration Steps
538
+ -------------------
539
+ To print testing configuration use following step :
540
+
541
+ Then I print configuration
542
+
543
+ ## Mobile Steps
544
+
545
+
546
+ ### Tap Steps
547
+ -----------
548
+ To tap on app element use following steps :
549
+
550
+ Then I tap on element having id "(.*?)"
551
+ Then I tap on element having name "(.*?)"
552
+ Then I tap on element having class "(.*?)"
553
+ Then I tap on element having xpath "(.*?)"
554
+ Then I tap on element having css "(.*?)"
555
+
556
+ To Tap on back button of device use following step :
557
+
558
+ Then I tap on back button of device
559
+ Then I press back button of device
560
+
561
+ ### Gesture Steps
562
+ ------------
563
+ To perform gesture operations on device
564
+
565
+ ### Swipe steps
566
+ ------------
567
+ To perform swipe using app elements use following steps :
568
+
569
+ Then I swipe from element having id "(.*?)" to element having id "(.*?)"
570
+ Then I swipe from element having id "(.*?)" to element having name "(.*?)"
571
+ Then I swipe from element having id "(.*?)" to element having class "(.*?)"
572
+ Then I swipe from element having id "(.*?)" to element having xpath "(.*?)"
573
+
574
+ Then I swipe from element having name "(.*?)" to element having id "(.*?)"
575
+ Then I swipe from element having name "(.*?)" to element having name "(.*?)"
576
+ Then I swipe from element having name "(.*?)" to element having class "(.*?)"
577
+ Then I swipe from element having name "(.*?)" to element having xpath "(.*?)"
578
+
579
+ Then I swipe from element having class "(.*?)" to element having id "(.*?)"
580
+ Then I swipe from element having class "(.*?)" to element having name "(.*?)"
581
+ Then I swipe from element having class "(.*?)" to element having class "(.*?)"
582
+ Then I swipe from element having class "(.*?)" to element having xpath "(.*?)"
583
+
584
+ Then I swipe from element having xpath "(.*?)" to element having id "(.*?)"
585
+ Then I swipe from element having xpath "(.*?)" to element having name "(.*?)"
586
+ Then I swipe from element having xpath "(.*?)" to element having class "(.*?)"
587
+ Then I swipe from element having xpath "(.*?)" to element having xpath "(.*?)"
588
+
589
+ To perform swipe using co-ordinates
590
+
591
+ Then I swipe from co-ordinates "(.*?)","(.*?)" to co-ordinates "(.*?)","(.*?)"
592
+
593
+ To perform swipe using direction
594
+
595
+ Then I swipe right
596
+ Then I swipe left
597
+ Then I swipe up
598
+ Then I swipe down
599
+
600
+ To perform swipe using app element with direction use following steps :
601
+
602
+ Then I swipe element having id "(.*?)" to right
603
+ Then I swipe element having name "(.*?)" to right
604
+ Then I swipe element having class "(.*?)" to right
605
+ Then I swipe element having xpath "(.*?)" to right
606
+
607
+ Then I swipe element having id "(.*?)" to left
608
+ Then I swipe element having name "(.*?)" to left
609
+ Then I swipe element having class "(.*?)" to left
610
+ Then I swipe element having xpath "(.*?)" to left
611
+
612
+ Then I swipe element having id "(.*?)" to up
613
+ Then I swipe element having name "(.*?)" to up
614
+ Then I swipe element having class "(.*?)" to up
615
+ Then I swipe element having xpath "(.*?)" to up
616
+
617
+ Then I swipe element having id "(.*?)" to down
618
+ Then I swipe element having name "(.*?)" to down
619
+ Then I swipe element having class "(.*?)" to down
620
+ Then I swipe element having xpath "(.*?)" to down
621
+
622
+ To perform swipe using co-ordinates with direction use following steps :
623
+
624
+ Then I swipe co-ordinates "(.*?)","(.*?)" to left
625
+ Then I swipe co-ordinates "(.*?)","(.*?)" to right
626
+ Then I swipe co-ordinates "(.*?)","(.*?)" to up
627
+ Then I swipe co-ordinates "(.*?)","(.*?)" to down
628
+
629
+
630
+ ### long tap steps
631
+ ------------
632
+ To perform long tap with default duration of 2 seconds on app elements use following steps :
633
+
634
+ Then I long tap on element having id "(.*?)"
635
+ Then I long tap on element having name "(.*?)"
636
+ Then I long tap on element having class "(.*?)"
637
+ Then I long tap on element having xpath "(.*?)"
638
+
639
+ To perform long tap with customized duration of seconds on app elements use following steps :
640
+
641
+ Then I long tap on element having id "(.*?)" for "(.*?)" sec
642
+ Then I long tap on element having name "(.*?)" for "(.*?)" sec
643
+ Then I long tap on element having class "(.*?)" for "(.*?)" sec
644
+ Then I long tap on element having xpath "(.*?)" for "(.*?)" sec
645
+
646
+ To perform long tap with default duration of 2 seconds using co-ordinates use following step :
647
+
648
+ Then I long tap on co\-ordinate "(.*?)","(.*?)
649
+
650
+ To perform long tap with customized duration of seconds using co-ordinates use following step :
651
+
652
+ Then I long tap on co\-ordinate "(.*?)","(.*?)" for "(.*?)" sec
653
+
654
+ ### Close app step
655
+
656
+ Then I close app