selenium-cucumber 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. data/doc/canned_steps.md +337 -76
  2. data/doc/installation.md +13 -13
  3. data/features-skeleton/my_first.feature +5 -5
  4. data/features-skeleton/step_definitions/custom_steps.rb +3 -3
  5. data/features-skeleton/support/env.rb +37 -29
  6. data/lib/selenium-cucumber.rb +8 -7
  7. data/lib/selenium-cucumber/assertion_steps.rb +436 -57
  8. data/lib/selenium-cucumber/configuration_steps.rb +7 -0
  9. data/lib/selenium-cucumber/input_steps.rb +322 -0
  10. data/lib/selenium-cucumber/javascript_handling_steps.rb +9 -0
  11. data/lib/selenium-cucumber/methods/assertion_methods.rb +165 -34
  12. data/lib/selenium-cucumber/methods/configuration_methods.rb +9 -0
  13. data/lib/selenium-cucumber/methods/input_methods.rb +87 -0
  14. data/lib/selenium-cucumber/methods/javascript_handling_methods.rb +6 -0
  15. data/lib/selenium-cucumber/methods/navigate_methods.rb +75 -11
  16. data/lib/selenium-cucumber/methods/press_button_methods.rb +6 -6
  17. data/lib/selenium-cucumber/methods/progress_methods.rb +15 -6
  18. data/lib/selenium-cucumber/methods/screenshot_methods.rb +7 -0
  19. data/lib/selenium-cucumber/navigation_steps.rb +104 -9
  20. data/lib/selenium-cucumber/press_button_steps.rb +37 -13
  21. data/lib/selenium-cucumber/progress_steps.rb +58 -0
  22. data/lib/selenium-cucumber/screenshot_steps.rb +5 -0
  23. data/lib/selenium-cucumber/version.rb +1 -1
  24. metadata +19 -11
  25. data/lib/selenium-cucumber/enter_text_steps.rb +0 -27
  26. data/lib/selenium-cucumber/methods/enter_text_methods.rb +0 -14
  27. data/lib/selenium-cucumber/progress_step.rb +0 -17
  28. data/lib/selenium-cucumber/screenshot_step.rb +0 -8
@@ -1,4 +1,4 @@
1
- require 'selenium-cucumber'
2
-
3
- # Do Not Remove This File
1
+ require 'selenium-cucumber'
2
+
3
+ # Do Not Remove This File
4
4
  # Add your custom steps here
@@ -1,29 +1,37 @@
1
- require 'rubygems'
2
- require 'selenium-webdriver'
3
-
4
- $BASE_URL = ENV["URL"] || "ff"
5
-
6
- case ENV['BROWSER']
7
- when 'ie'
8
- browser_type = :ie
9
- when 'ff'
10
- browser_type = :ff
11
- when 'chrome'
12
- browser_type = :chrome
13
- when 'opera'
14
- browser_type = :opera
15
- else
16
- browser_type = :ff
17
- end
18
-
19
- browser = Selenium::WebDriver.for(browser_type)
20
- #puts browser_type.to_s
21
- Before do
22
- $driver = browser
23
- $driver.manage().window().maximize()
24
- # $driver.get $BASE_URL
25
- end
26
-
27
- at_exit() do
28
- $driver.close
29
- end
1
+ require 'rubygems'
2
+ require 'selenium-webdriver'
3
+
4
+ def print_error
5
+ puts "\nInappropraite browser \"#{ENV['BROWSER']}\""
6
+ puts "\nUsage : cucumber BROWSER=browser_name"
7
+ puts "\nbrowser_name can be one of following :"
8
+ puts "1.ie\n2.chrome\n3.ff\n4.safari\n5.opera"
9
+ puts "\nNow using default browser \"Firefox\""
10
+ end
11
+
12
+ case ENV['BROWSER']
13
+ when 'ie'
14
+ browser_type = :ie
15
+ when 'ff'
16
+ browser_type = :ff
17
+ when 'chrome'
18
+ browser_type = :chrome
19
+ when 'opera'
20
+ browser_type = :opera
21
+ when 'safari'
22
+ browser_type = :safari
23
+ else
24
+ if ENV['BROWSER']
25
+ print_error
26
+ end
27
+ browser_type = :ff
28
+ end
29
+
30
+ begin
31
+ $driver = Selenium::WebDriver.for(browser_type)
32
+ $driver.manage().window().maximize()
33
+
34
+ rescue Exception => e
35
+ puts e.message
36
+ end
37
+
@@ -1,7 +1,8 @@
1
-
2
- require 'selenium-cucumber/assertion_steps'
3
- require 'selenium-cucumber/enter_text_steps'
4
- require 'selenium-cucumber/navigation_steps'
5
- require 'selenium-cucumber/press_button_steps'
6
- require 'selenium-cucumber/progress_step'
7
- require 'selenium-cucumber/screenshot_step'
1
+
2
+ require 'selenium-cucumber/assertion_steps'
3
+ require 'selenium-cucumber/input_steps'
4
+ require 'selenium-cucumber/navigation_steps'
5
+ require 'selenium-cucumber/press_button_steps'
6
+ require 'selenium-cucumber/progress_steps'
7
+ require 'selenium-cucumber/screenshot_steps'
8
+ require 'selenium-cucumber/configuration_steps'
@@ -1,58 +1,437 @@
1
- require_relative 'methods/assertion_methods'
2
-
3
- #Page title checking
4
- Then(/^I see page title as "(.*?)"$/) do |title|
5
- check_title(title)
6
- end
7
-
8
- #Element Value checking - Positive Case
9
- Then /^I should see element value as "([^\"]*)" where element id is "([^\"]*)"$/ do |element_value, element_id|
10
- check_element_value("id",element_value,element_id,true)
11
- end
12
-
13
- Then /^I should see element value as "([^\"]*)" where element name is "([^\"]*)"$/ do |element_value, element_name|
14
- check_element_value("name",element_value,element_name,true)
15
- end
16
-
17
- Then /^I should see element value as "([^\"]*)" where element xpath is "([^\"]*)"$/ do |element_value, element_xpath|
18
- check_element_value("xpath",element_value,element_xpath,true)
19
- end
20
-
21
- #Element Value checking - Negative Case
22
- Then /^I should not see element value as "([^\"]*)" where element id is "([^\"]*)"$/ do |element_value, element_id|
23
- check_element_value("id",element_value,element_id,false)
24
- end
25
-
26
- Then /^I should not see element value as "([^\"]*)" where element name is "([^\"]*)"$/ do |element_value, element_name|
27
- check_element_value("name",element_value,element_name,false)
28
- end
29
-
30
- Then /^I should not see element value as "([^\"]*)" where element xpath is "([^\"]*)"$/ do |element_value, element_xpath|
31
- check_element_value("xpath",element_value,element_xpath,false)
32
- end
33
-
34
- #Element enabled checking - Positive Case
35
- Then /^element with id "([^\"]*)" should enable$/ do |element_id|
36
- check_element_enable("id", element_id, true)
37
- end
38
-
39
- Then /^element with name "([^\"]*)" should enable$/ do |element_name|
40
- check_element_enable("name", element_name, true)
41
- end
42
-
43
- Then /^element with xpath "([^\"]*)" should enable$/ do |element_xpath|
44
- check_element_enable("xpath", element_xpath, true)
45
- end
46
-
47
- #Element disabled checking - Positive Case
48
- Then /^element with id "([^\"]*)" should disable$/ do |element_id|
49
- check_element_enable("id", element_id, false)
50
- end
51
-
52
- Then /^element with name "([^\"]*)" should disable$/ do |element_name|
53
- check_element_enable("name", element_name, false)
54
- end
55
-
56
- Then /^element with xpath "([^\"]*)" should disable$/ do |element_xpath|
57
- check_element_enable("xpath", element_xpath, false)
1
+ require_relative 'methods/assertion_methods'
2
+
3
+ #Page title checking
4
+ Then(/^I see page title as "(.*?)"$/) do |title|
5
+ check_title(title)
6
+ end
7
+
8
+ #Check element text steps : positive test
9
+
10
+ #By ID
11
+ Then(/^I should see text as "(.*?)" for element having id "(.*?)"$/) do |actual_value , access_name|
12
+ check_element_text("id", actual_value, access_name, true)
13
+ end
14
+
15
+ #By CLASS
16
+ Then(/^I should see text as "(.*?)" for element having class "(.*?)"$/) do |actual_value , access_name|
17
+ check_element_text("class", actual_value, access_name, true)
18
+ end
19
+
20
+ #By NAME
21
+ Then(/^I should see text as "(.*?)" for element having name "(.*?)"$/) do |actual_value , access_name|
22
+ check_element_text("name", actual_value, access_name, true)
23
+ end
24
+
25
+ #By XPATH
26
+ Then(/^I should see text as "(.*?)" for element having xpath "(.*?)"$/) do |actual_value , access_name|
27
+ check_element_text("xpath", actual_value, access_name, true)
28
+ end
29
+
30
+ #By CSS
31
+ Then(/^I should see text as "(.*?)" for element having css "(.*?)"$/) do |actual_value , access_name|
32
+ check_element_text("css", actual_value, access_name, true)
33
+ end
34
+
35
+ # check element text steps : negative test
36
+
37
+ #By ID
38
+ Then(/^I should not see text as "(.*?)" for element having id "(.*?)"$/) do |actual_value , access_name|
39
+ check_element_text("id", actual_value, access_name, false)
40
+ end
41
+
42
+ #By CLASS
43
+ Then(/^I should not see text as "(.*?)" for element having class "(.*?)"$/) do |actual_value , access_name|
44
+ check_element_text("class", actual_value, access_name, false)
45
+ end
46
+
47
+ #By NAME
48
+ Then(/^I should not see text as "(.*?)" for element having name "(.*?)"$/) do |actual_value , access_name|
49
+ check_element_text("name", actual_value, access_name, false)
50
+ end
51
+
52
+ #By XPATH
53
+ Then(/^I should not see text as "(.*?)" for element having xpath "(.*?)"$/) do |actual_value , access_name|
54
+ check_element_text("xpath", actual_value, access_name, false)
55
+ end
56
+
57
+ #By CSS
58
+ Then(/^I should not see text as "(.*?)" for element having css "(.*?)"$/) do |actual_value , access_name|
59
+ check_element_text("css", actual_value, access_name, false)
60
+ end
61
+
62
+ # To check attribute value - positive test
63
+
64
+ #By ID
65
+ Then(/^I should see attribute "(.*?)" having value "(.*?)" for element having id "(.*?)"$/) do |attribute_name , attribute_value , access_name|
66
+ check_element_attribute("id", attribute_name , attribute_value, access_name, true)
67
+ end
68
+
69
+ #By CLASS
70
+ Then(/^I should see attribute "(.*?)" having value "(.*?)" for element having class "(.*?)"$/) do |attribute_name , attribute_value , access_name|
71
+ check_element_attribute("class", attribute_name , attribute_value, access_name, true)
72
+ end
73
+
74
+ #By NAME
75
+ Then(/^I should see attribute "(.*?)" having value "(.*?)" for element having name "(.*?)"$/) do |attribute_name , attribute_value , access_name|
76
+ check_element_attribute("name", attribute_name , attribute_value, access_name, true)
77
+ end
78
+
79
+ #By XPATH
80
+ Then(/^I should see attribute "(.*?)" having value "(.*?)" for element having xpath "(.*?)"$/) do |attribute_name , attribute_value , access_name|
81
+ check_element_attribute("xpath", attribute_name , attribute_value, access_name, true)
82
+ end
83
+
84
+ #By CSS
85
+ Then(/^I should see attribute "(.*?)" having value "(.*?)" for element having css "(.*?)"$/) do |attribute_name , attribute_value , access_name|
86
+ check_element_attribute("css", attribute_name , attribute_value, access_name, true)
87
+ end
88
+
89
+ # To check attribute value - negative test
90
+
91
+ #By ID
92
+ Then(/^I should not see attribute "(.*?)" having value "(.*?)" for element having id "(.*?)"$/) do |attribute_name , attribute_value , access_name|
93
+ check_element_attribute("id", attribute_name , attribute_value, access_name, false)
94
+ end
95
+
96
+ #By CLASS
97
+ Then(/^I should not see attribute "(.*?)" having value "(.*?)" for element having class "(.*?)"$/) do |attribute_name , attribute_value , access_name|
98
+ check_element_attribute("class", attribute_name , attribute_value, access_name, false)
99
+ end
100
+
101
+ #By NAME
102
+ Then(/^I should not see attribute "(.*?)" having value "(.*?)" for element having name "(.*?)"$/) do |attribute_name , attribute_value , access_name|
103
+ check_element_attribute("name", attribute_name , attribute_value, access_name, false)
104
+ end
105
+
106
+ #By XPATH
107
+ Then(/^I should not see attribute "(.*?)" having value "(.*?)" for element having xpath "(.*?)"$/) do |attribute_name , attribute_value , access_name|
108
+ check_element_attribute("xpath", attribute_name , attribute_value, access_name, false)
109
+ end
110
+
111
+ #By CSS
112
+ Then(/^I should not see attribute "(.*?)" having value "(.*?)" for element having css "(.*?)"$/) do |attribute_name , attribute_value , access_name|
113
+ check_element_attribute("css", attribute_name , attribute_value, access_name, false)
114
+ end
115
+
116
+ #Element enabled checking - Positive test
117
+ #By ID
118
+ Then(/^element having id "([^\"]*)" should enable$/) do |access_name|
119
+ check_element_enable("id", access_name, true)
120
+ end
121
+
122
+ #By NAME
123
+ Then(/^element having name "([^\"]*)" should enable$/) do |access_name|
124
+ check_element_enable("name", access_name, true)
125
+ end
126
+
127
+ #By CLASS
128
+ Then(/^element having class "([^\"]*)" should enable$/) do |access_name|
129
+ check_element_enable("class", access_name, true)
130
+ end
131
+
132
+ #By XPATH
133
+ Then(/^element having xpath "([^\"]*)" should enable$/) do |access_name|
134
+ check_element_enable("xpath", access_name, true)
135
+ end
136
+
137
+ #By CSS
138
+ Then(/^element having css "([^\"]*)" should enable$/) do |access_name|
139
+ check_element_enable("css", access_name, true)
140
+ end
141
+
142
+
143
+ #Element disabled checking - Negative test
144
+ #By ID
145
+ Then(/^element having id "([^\"]*)" should disable$/) do |access_name|
146
+ check_element_enable("id", access_name, false)
147
+ end
148
+
149
+ #By NAME
150
+ Then (/^element having name "([^\"]*)" should disable$/) do |access_name|
151
+ check_element_enable("name", access_name, false)
152
+ end
153
+
154
+ #By CLASS
155
+ Then (/^element having class "([^\"]*)" should disable$/) do |access_name|
156
+ check_element_enable("class", access_name, false)
157
+ end
158
+
159
+ #By XPATH
160
+ Then (/^element having xpath "([^\"]*)" should disable$/) do |access_name|
161
+ check_element_enable("xpath", access_name, false)
162
+ end
163
+
164
+ #By CSS
165
+ Then (/^element having css "([^\"]*)" should disable$/) do |access_name|
166
+ check_element_enable("css", access_name, false)
167
+ end
168
+
169
+ #element presence - positive test
170
+ Then(/^I should see element present having id "(.*?)"$/) do |access_name|
171
+ check_element_presence("id", access_name, true)
172
+ end
173
+
174
+ Then(/^I should see element present having name "(.*?)"$/) do |access_name|
175
+ check_element_presence("name", access_name, true)
176
+ end
177
+
178
+ Then(/^I should see element present having class "(.*?)"$/) do |access_name|
179
+ check_element_presence("class", access_name, true)
180
+ end
181
+
182
+ Then(/^I should see element present having xpath "(.*?)"$/) do |access_name|
183
+ check_element_presence("xpath", access_name, true)
184
+ end
185
+
186
+ Then(/^I should see element present having css "(.*?)"$/) do |access_name|
187
+ check_element_presence("css", access_name, true)
188
+ end
189
+
190
+ #element presence - negative test
191
+
192
+ Then(/^I should not see element present having id "(.*?)"$/) do |access_name|
193
+ check_element_presence("id", access_name, false)
194
+ end
195
+
196
+ Then(/^I should not see element present having name "(.*?)"$/) do |access_name|
197
+ check_element_presence("name", access_name, false)
198
+ end
199
+
200
+ Then(/^I should not see element present having class "(.*?)"$/) do |access_name|
201
+ check_element_presence("class", access_name, false)
202
+ end
203
+
204
+ Then(/^I should not see element present having xpath "(.*?)"$/) do |access_name|
205
+ check_element_presence("xpath", access_name, false)
206
+ end
207
+
208
+ Then(/^I should not see element present having css "(.*?)"$/) do |access_name|
209
+ check_element_presence("css", access_name, false)
210
+ end
211
+
212
+
213
+ #assert check box is checked
214
+ #By ID
215
+ Then(/^I should see checkbox having id "(.*?)" checked$/) do |access_name|
216
+ is_checkbox_checked("id",access_name)
217
+ end
218
+
219
+ #By NAME
220
+ Then(/^I should see checkbox having name "(.*?)" checked$/) do |access_name|
221
+ is_checkbox_checked("name",access_name)
222
+ end
223
+
224
+ #By CLASS
225
+ Then(/^I should see checkbox having class "(.*?)" checked$/) do |access_name|
226
+ is_checkbox_checked("class",access_name)
227
+ end
228
+
229
+ #By XPATH
230
+ Then(/^I should see checkbox having xpath "(.*?)" checked$/) do |access_name|
231
+ is_checkbox_checked("xpath",access_name)
232
+ end
233
+
234
+ #By CSS
235
+ Then(/^I should see checkbox having css "(.*?)" checked$/) do |access_name|
236
+ is_checkbox_checked("css",access_name)
237
+ end
238
+
239
+ #assert check box is unchecked
240
+ #By ID
241
+ Then(/^I should see checkbox having id "(.*?)" unchecked$/) do |access_name|
242
+ is_checkbox_unchecked("id",access_name)
243
+ end
244
+
245
+ #By NAME
246
+ Then(/^I should see checkbox having name "(.*?)" unchecked$/) do |access_name|
247
+ is_checkbox_unchecked("name",access_name)
248
+ end
249
+
250
+ #By CLASS
251
+ Then(/^I should see checkbox having class "(.*?)" unchecked$/) do |access_name|
252
+ is_checkbox_unchecked("class",access_name)
253
+ end
254
+
255
+ #By XPATH
256
+ Then(/^I should see checkbox having xpath "(.*?)" unchecked$/) do |access_name|
257
+ is_checkbox_unchecked("xpath",access_name)
258
+ end
259
+
260
+ #By CSS
261
+ Then(/^I should see checkbox having css "(.*?)" unchecked$/) do |access_name|
262
+ is_checkbox_unchecked("css",access_name)
263
+ end
264
+
265
+ #steps to assert radio button checked
266
+ #By ID
267
+ Then(/^I should see radio button having id "(.*?)" selected$/) do |access_name|
268
+ is_radio_button_selected("id",access_name)
269
+ end
270
+
271
+ #By NAME
272
+ Then(/^I should see radio button having name "(.*?)" selected$/) do |access_name|
273
+ is_radio_button_selected("name",access_name)
274
+ end
275
+
276
+ #By CLASS
277
+ Then(/^I should see radio button having class "(.*?)" selected$/) do |access_name|
278
+ is_radio_button_selected("class",access_name)
279
+ end
280
+
281
+ #By XPATH
282
+ Then(/^I should see radio button having xpath "(.*?)" selected$/) do |access_name|
283
+ is_radio_button_selected("xpath",access_name)
284
+ end
285
+
286
+ #By CSS
287
+ Then(/^I should see radio button having css "(.*?)" selected$/) do |access_name|
288
+ is_radio_button_selected("css",access_name)
289
+ end
290
+
291
+ #steps to assert radio button checked
292
+ #By ID
293
+ Then(/^I should see radio button having id "(.*?)" not selected$/) do |access_name|
294
+ is_radio_button_unselected("id",access_name)
295
+ end
296
+
297
+ #By NAME
298
+ Then(/^I should see radio button having name "(.*?)" not selected$/) do |access_name|
299
+ is_radio_button_unselected("name",access_name)
300
+ end
301
+
302
+ #By CLASS
303
+ Then(/^I should see radio button having class "(.*?)" not selected$/) do |access_name|
304
+ is_radio_button_unselected("class",access_name)
305
+ end
306
+
307
+ #By XPATH
308
+ Then(/^I should see radio button having xpath "(.*?)" not selected$/) do |access_name|
309
+ is_radio_button_unselected("xpath",access_name)
310
+ end
311
+
312
+ #By CSS
313
+ Then(/^I should see radio button having css "(.*?)" not selected$/) do |access_name|
314
+ is_radio_button_unselected("css",access_name)
315
+ end
316
+
317
+ #steps to assert option by text from radio button group selected
318
+ #By ID
319
+ Then(/^I should see "(.*?)" option by text from radio button group having id "(.*?)" selected$/) do |option, access_name|
320
+ is_option_from_radio_button_group_selected("id","text",option,access_name)
321
+ end
322
+
323
+ #By NAME
324
+ Then(/^I should see "(.*?)" option by text from radio button group having name "(.*?)" selected$/) do |option, access_name|
325
+ is_option_from_radio_button_group_selected("name","text",option,access_name)
326
+ end
327
+
328
+ #By CLASS
329
+ Then(/^I should see "(.*?)" option by text from radio button group having class "(.*?)" selected$/) do |option, access_name|
330
+ is_option_from_radio_button_group_selected("class","text",option,access_name)
331
+ end
332
+
333
+ #By XPATH
334
+ Then(/^I should see "(.*?)" option by text from radio button group having xpath "(.*?)" selected$/) do |option, access_name|
335
+ is_option_from_radio_button_group_selected("xpath","text",option,access_name)
336
+ end
337
+
338
+ #By CSS
339
+ Then(/^I should see "(.*?)" option by text from radio button group having css "(.*?)" selected$/) do |option, access_name|
340
+ is_option_from_radio_button_group_selected("css","text",option,access_name)
341
+ end
342
+
343
+ #steps to assert option by value from radio button group selected
344
+ #By ID
345
+ Then(/^I should see "(.*?)" option by value from radio button group having id "(.*?)" selected$/) do |option, access_name|
346
+ is_option_from_radio_button_group_selected("id","value",option,access_name)
347
+ end
348
+
349
+ #By NAME
350
+ Then(/^I should see "(.*?)" option by value from radio button group having name "(.*?)" selected$/) do |option, access_name|
351
+ is_option_from_radio_button_group_selected("name","value",option,access_name)
352
+ end
353
+
354
+ #By CLASS
355
+ Then(/^I should see "(.*?)" option by value from radio button group having class "(.*?)" selected$/) do |option, access_name|
356
+ is_option_from_radio_button_group_selected("class","value",option,access_name)
357
+ end
358
+
359
+ #By XPATH
360
+ Then(/^I should see "(.*?)" option by value from radio button group having xpath "(.*?)" selected$/) do |option, access_name|
361
+ is_option_from_radio_button_group_selected("xpath","value",option,access_name)
362
+ end
363
+
364
+ #By CSS
365
+ Then(/^I should see "(.*?)" option by value from radio button group having css "(.*?)" selected$/) do |option, access_name|
366
+ is_option_from_radio_button_group_selected("css","value",option,access_name)
367
+ end
368
+
369
+ #steps to assert option by text from radio button group not selected
370
+ #By ID
371
+ Then(/^I should see "(.*?)" option by text from radio button group having id "(.*?)" not selected$/) do |option, access_name|
372
+ is_option_from_radio_button_group_not_selected("id","text",option,access_name)
373
+ end
374
+
375
+ #By NAME
376
+ Then(/^I should see "(.*?)" option by text from radio button group having name "(.*?)" not selected$/) do |option, access_name|
377
+ is_option_from_radio_button_group_not_selected("name","text",option,access_name)
378
+ end
379
+
380
+ #By CLASS
381
+ Then(/^I should see "(.*?)" option by text from radio button group having class "(.*?)" not selected$/) do |option, access_name|
382
+ is_option_from_radio_button_group_not_selected("class","text",option,access_name)
383
+ end
384
+
385
+ #By XPATH
386
+ Then(/^I should see "(.*?)" option by text from radio button group having xpath "(.*?)" not selected$/) do |option, access_name|
387
+ is_option_from_radio_button_group_not_selected("xpath","text",option,access_name)
388
+ end
389
+
390
+ #By CSS
391
+ Then(/^I should see "(.*?)" option by text from radio button group having css "(.*?)" not selected$/) do |option, access_name|
392
+ is_option_from_radio_button_group_not_selected("css","text",option,access_name)
393
+ end
394
+
395
+ #steps to assert option by value from radio button group not selected
396
+ #By ID
397
+ Then(/^I should see "(.*?)" option by value from radio button group having id "(.*?)" not selected$/) do |option, access_name|
398
+ is_option_from_radio_button_group_not_selected("id","value",option,access_name)
399
+ end
400
+
401
+ #By NAME
402
+ Then(/^I should see "(.*?)" option by value from radio button group having name "(.*?)" not selected$/) do |option, access_name|
403
+ is_option_from_radio_button_group_not_selected("name","value",option,access_name)
404
+ end
405
+
406
+ #By CLASS
407
+ Then(/^I should see "(.*?)" option by value from radio button group having class "(.*?)" not selected$/) do |option, access_name|
408
+ is_option_from_radio_button_group_not_selected("class","value",option,access_name)
409
+ end
410
+
411
+ #By XPATH
412
+ Then(/^I should see "(.*?)" option by value from radio button group having xpath "(.*?)" not selected$/) do |option, access_name|
413
+ is_option_from_radio_button_group_not_selected("xpath","value",option,access_name)
414
+ end
415
+
416
+ #By CSS
417
+ Then(/^I should see "(.*?)" option by value from radio button group having css "(.*?)" not selected$/) do |option, access_name|
418
+ is_option_from_radio_button_group_not_selected("css","value",option,access_name)
419
+ end
420
+
421
+ #steps to check link presence
422
+
423
+ Then(/^I should see link present having text "(.*?)"$/) do |access_name|
424
+ check_element_presence("link", access_name, true)
425
+ end
426
+
427
+ Then(/^I should see link not present having text "(.*?)"$/) do |access_name|
428
+ check_element_presence("link", access_name, false)
429
+ end
430
+
431
+ Then(/^I should see link present having partial text "(.*?)"$/) do |access_name|
432
+ check_element_presence("partial_link_text", access_name, true)
433
+ end
434
+
435
+ Then(/^I should see link not present having partial text "(.*?)"$/) do |access_name|
436
+ check_element_presence("partial_link_text", access_name, false)
58
437
  end