selenium-cucumber 2.1.3 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/doc/canned_steps.md +13 -8
  3. data/example/android/android_app/HinduCalendar.zip +0 -0
  4. data/example/android/android_app/HinduCalendar/HinduCalendar.apk +0 -0
  5. data/example/android/android_app/HinduCalendar/README.md +19 -0
  6. data/example/android/android_app/HinduCalendar/Results.html +472 -0
  7. data/example/android/android_app/HinduCalendar/features/01_HC_homepage_menu_validation.feature +36 -0
  8. data/example/android/android_app/HinduCalendar/features/02_HC_homepage_menu_navigation.feature +71 -0
  9. data/example/android/android_app/HinduCalendar/features/03_HC_Create_Save_View_Delete_Kundali.feature +63 -0
  10. data/example/android/android_app/HinduCalendar/features/actual_images/test.png +0 -0
  11. data/example/android/android_app/HinduCalendar/features/expected_images/test.png +0 -0
  12. data/example/android/android_app/HinduCalendar/features/image_difference/test.png +0 -0
  13. data/example/android/android_app/HinduCalendar/features/my_first.feature +1 -0
  14. data/example/android/android_app/HinduCalendar/features/screenshots/test.png +0 -0
  15. data/example/android/android_app/HinduCalendar/features/step_definitions/01_HC_homepage_menu_validation.rb +81 -0
  16. data/example/android/android_app/HinduCalendar/features/step_definitions/02_HC_homepage_menu_navigation.rb +132 -0
  17. data/example/android/android_app/HinduCalendar/features/step_definitions/03_HC_Create_Save_View_Delete_Kundali.rb +413 -0
  18. data/example/android/android_app/HinduCalendar/features/step_definitions/custom_steps.rb +5 -0
  19. data/example/android/android_app/HinduCalendar/features/support/env.rb +51 -0
  20. data/example/android/android_app/HinduCalendar/features/support/hooks.rb +38 -0
  21. data/example/android/android_app/android_app_calculator.zip +0 -0
  22. data/example/android/android_app/android_app_calculator/AndroidCalculator.apk +0 -0
  23. data/example/android/android_app/android_app_calculator/features/actual_images/test.png +0 -0
  24. data/example/android/android_app/android_app_calculator/features/calculator.feature +36 -0
  25. data/example/android/android_app/android_app_calculator/features/expected_images/test.png +0 -0
  26. data/example/android/android_app/android_app_calculator/features/image_difference/test.png +0 -0
  27. data/example/android/android_app/android_app_calculator/features/my_first.feature +13 -0
  28. data/example/android/android_app/android_app_calculator/features/screenshots/test.png +0 -0
  29. data/example/android/android_app/android_app_calculator/features/step_definitions/custom_steps.rb +5 -0
  30. data/example/android/android_app/android_app_calculator/features/support/env.rb +51 -0
  31. data/example/android/android_app/android_app_calculator/features/support/hooks.rb +38 -0
  32. data/example/android/android_web/android_web_gmail_login.zip +0 -0
  33. data/example/android/android_web/android_web_gmail_login/features/actual_images/test.png +0 -0
  34. data/example/android/android_web/android_web_gmail_login/features/expected_images/test.png +0 -0
  35. data/example/android/android_web/android_web_gmail_login/features/gmail_login.feature +12 -0
  36. data/example/android/android_web/android_web_gmail_login/features/image_difference/test.png +0 -0
  37. data/example/android/android_web/android_web_gmail_login/features/my_first.feature +1 -0
  38. data/example/android/android_web/android_web_gmail_login/features/screenshots/test.png +0 -0
  39. data/example/android/android_web/android_web_gmail_login/features/step_definitions/custom_steps.rb +5 -0
  40. data/example/android/android_web/android_web_gmail_login/features/support/env.rb +51 -0
  41. data/example/android/android_web/android_web_gmail_login/features/support/hooks.rb +38 -0
  42. data/example/desktop web/desktop_web_gmail_login.zip +0 -0
  43. data/example/desktop web/desktop_web_gmail_login/features/actual_images/test.png +0 -0
  44. data/example/desktop web/desktop_web_gmail_login/features/expected_images/test.png +0 -0
  45. data/example/desktop web/desktop_web_gmail_login/features/gmail_login.feature +10 -0
  46. data/example/desktop web/desktop_web_gmail_login/features/gmail_multi_login.feature +22 -0
  47. data/example/desktop web/desktop_web_gmail_login/features/image_difference/test.png +0 -0
  48. data/example/desktop web/desktop_web_gmail_login/features/my_first.feature +1 -0
  49. 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
  50. data/example/desktop web/desktop_web_gmail_login/features/screenshots/test.png +0 -0
  51. data/example/desktop web/desktop_web_gmail_login/features/step_definitions/custom_steps.rb +5 -0
  52. data/example/desktop web/desktop_web_gmail_login/features/support/env.rb +51 -0
  53. data/example/desktop web/desktop_web_gmail_login/features/support/hooks.rb +38 -0
  54. data/example/desktop web/desktop_web_gmail_login/result.html +478 -0
  55. data/lib/selenium-cucumber/methods/assertion_methods.rb +15 -15
  56. data/lib/selenium-cucumber/methods/configuration_methods.rb +1 -1
  57. data/lib/selenium-cucumber/version.rb +1 -1
  58. metadata +71 -43
@@ -15,11 +15,11 @@ def check_title(title, test_case)
15
15
  page_title = get_page_title
16
16
  if test_case
17
17
  if page_title != "#{title}"
18
- raise TestCaseFailed, "Page Title Not Matched, Actual Page Title : #{page_title}"
18
+ raise TestCaseFailed, "Page Title Not Matched, Actual Page Title : #{page_title}, Expected Page Title : #{title}"
19
19
  end
20
20
  else
21
21
  if page_title == "#{title}"
22
- raise TestCaseFailed, "Page Title Matched, Actual Page Title:#{page_title}"
22
+ raise TestCaseFailed, "Page Title Matched, Actual Page Title: #{page_title}"
23
23
  end
24
24
  end
25
25
  end
@@ -52,16 +52,16 @@ end
52
52
  # param 2 : String : Expected element text
53
53
  # param 3 : String : Locator value
54
54
  # param 4 : Boolean : test case [true or flase]
55
- def check_element_text(access_type, actual_value, access_name, test_case)
55
+ def check_element_text(access_type, expected_value, access_name, test_case)
56
56
  element_text = get_element_text(access_type, access_name)
57
57
 
58
58
  if test_case
59
- if element_text != actual_value
60
- raise TestCaseFailed, 'Text Not Matched'
59
+ if element_text != expected_value
60
+ raise TestCaseFailed, "Text Not Matched, Actual Text : #{element_text}, Expected Text : #{expected_value}"
61
61
  end
62
62
  else
63
- if element_text == actual_value
64
- raise TestCaseFailed, 'Text Matched'
63
+ if element_text == expected_value
64
+ raise TestCaseFailed, "Text Matched, Actual Text : #{element_text}"
65
65
  end
66
66
  end
67
67
  end
@@ -71,16 +71,16 @@ end
71
71
  # param 2 : String : Expected element partial text
72
72
  # param 3 : String : Locator value
73
73
  # param 4 : Boolean : test case [true or flase]
74
- def check_element_partial_text(access_type, actual_value, access_name, test_case)
74
+ def check_element_partial_text(access_type, expected_value, access_name, test_case)
75
75
  element_text = get_element_text(access_type, access_name)
76
76
 
77
77
  if test_case
78
- if not element_text.include? "#{actual_value}"
79
- raise TestCaseFailed, 'Text Not Matched'
78
+ if not element_text.include? "#{expected_value}"
79
+ raise TestCaseFailed, "Element text : #{element_text}, does not contains partial text as : #{expected_value}"
80
80
  end
81
81
  else
82
- if element_text.include? "#{actual_value}"
83
- raise TestCaseFailed, 'Text Matched'
82
+ if element_text.include? "#{expected_value}"
83
+ raise TestCaseFailed, "Element text : #{element_text}, contains partial text as : #{expected_value}"
84
84
  end
85
85
  end
86
86
  end
@@ -126,11 +126,11 @@ def check_element_attribute(access_type, attribute_name, attribute_value, access
126
126
 
127
127
  if test_case
128
128
  if attr_val != attribute_value
129
- raise TestCaseFailed, 'Attribute Value Not Matched'
129
+ raise TestCaseFailed, "Attribute Value Not Matched, Actual Value : #{attr_val}, Expected Value : #{attribute_value}"
130
130
  end
131
131
  else
132
132
  if attr_val == attribute_value
133
- raise TestCaseFailed, 'Attribute Value Matched'
133
+ raise TestCaseFailed, "Attribute Value Matched, Actual Value : #{attr_val}"
134
134
  end
135
135
  end
136
136
  end
@@ -215,7 +215,7 @@ end
215
215
  # method to check javascript pop-up alert text
216
216
  def check_alert_text(text)
217
217
  if get_alert_text != text
218
- raise TestCaseFailed, 'Text on alert pop up not matched'
218
+ raise TestCaseFailed, "Text on alert pop up not matched, Actual Text : #{get_alert_text}, Expected Text : #{text}"
219
219
  end
220
220
  end
221
221
 
@@ -15,7 +15,7 @@ end
15
15
 
16
16
  # method to print desktop configuration
17
17
  def print_desktop_configuration
18
- puts 'Platform : ' + Selenium::WebDriver::Platform.os.to_s.upcase
18
+ puts 'Platform : ' + $driver.capabilities.platform.to_s.upcase
19
19
  puts 'Browser : ' + $driver.capabilities.browser_name.to_s.upcase + " " + $driver.capabilities.version.to_s
20
20
  puts ''
21
21
  end
@@ -1,5 +1,5 @@
1
1
  module Selenium
2
2
  module Cucumber
3
- VERSION = '2.1.3'
3
+ VERSION = '2.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,22 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sameer Sawant
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-09 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: 2.0.0
20
17
  - - '>='
21
18
  - !ruby/object:Gem::Version
22
19
  version: 1.3.18
@@ -24,9 +21,6 @@ dependencies:
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 2.0.0
30
24
  - - '>='
31
25
  - !ruby/object:Gem::Version
32
26
  version: 1.3.18
@@ -34,9 +28,6 @@ dependencies:
34
28
  name: selenium-webdriver
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - ~>
38
- - !ruby/object:Gem::Version
39
- version: 2.45.0
40
31
  - - '>='
41
32
  - !ruby/object:Gem::Version
42
33
  version: 2.41.0
@@ -44,9 +35,6 @@ dependencies:
44
35
  prerelease: false
45
36
  version_requirements: !ruby/object:Gem::Requirement
46
37
  requirements:
47
- - - ~>
48
- - !ruby/object:Gem::Version
49
- version: 2.45.0
50
38
  - - '>='
51
39
  - !ruby/object:Gem::Version
52
40
  version: 2.41.0
@@ -54,9 +42,6 @@ dependencies:
54
42
  name: chunky_png
55
43
  requirement: !ruby/object:Gem::Requirement
56
44
  requirements:
57
- - - ~>
58
- - !ruby/object:Gem::Version
59
- version: 1.3.3
60
45
  - - '>='
61
46
  - !ruby/object:Gem::Version
62
47
  version: 1.3.0
@@ -64,9 +49,6 @@ dependencies:
64
49
  prerelease: false
65
50
  version_requirements: !ruby/object:Gem::Requirement
66
51
  requirements:
67
- - - ~>
68
- - !ruby/object:Gem::Version
69
- version: 1.3.3
70
52
  - - '>='
71
53
  - !ruby/object:Gem::Version
72
54
  version: 1.3.0
@@ -74,9 +56,6 @@ dependencies:
74
56
  name: appium_lib
75
57
  requirement: !ruby/object:Gem::Requirement
76
58
  requirements:
77
- - - ~>
78
- - !ruby/object:Gem::Version
79
- version: 4.1.0
80
59
  - - '>='
81
60
  - !ruby/object:Gem::Version
82
61
  version: 4.0.0
@@ -84,9 +63,6 @@ dependencies:
84
63
  prerelease: false
85
64
  version_requirements: !ruby/object:Gem::Requirement
86
65
  requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: 4.1.0
90
66
  - - '>='
91
67
  - !ruby/object:Gem::Version
92
68
  version: 4.0.0
@@ -98,22 +74,6 @@ executables:
98
74
  extensions: []
99
75
  extra_rdoc_files: []
100
76
  files:
101
- - bin/generate.rb
102
- - bin/helper.rb
103
- - bin/selenium-cucumber
104
- - doc/canned_steps.md
105
- - doc/installation.md
106
- - doc/selenium-cucumber-API.md
107
- - doc/selenium-cucumber-help.md
108
- - features-skeleton/actual_images/test.png
109
- - features-skeleton/expected_images/test.png
110
- - features-skeleton/image_difference/test.png
111
- - features-skeleton/my_first.feature
112
- - features-skeleton/screenshots/test.png
113
- - features-skeleton/step_definitions/custom_steps.rb
114
- - features-skeleton/support/env.rb
115
- - features-skeleton/support/hooks.rb
116
- - lib/selenium-cucumber.rb
117
77
  - lib/selenium-cucumber/assertion_steps.rb
118
78
  - lib/selenium-cucumber/click_elements_steps.rb
119
79
  - lib/selenium-cucumber/configuration_steps.rb
@@ -136,6 +96,74 @@ files:
136
96
  - lib/selenium-cucumber/progress_steps.rb
137
97
  - lib/selenium-cucumber/screenshot_steps.rb
138
98
  - lib/selenium-cucumber/version.rb
99
+ - lib/selenium-cucumber.rb
100
+ - bin/generate.rb
101
+ - bin/helper.rb
102
+ - bin/selenium-cucumber
103
+ - doc/canned_steps.md
104
+ - doc/installation.md
105
+ - doc/selenium-cucumber-API.md
106
+ - doc/selenium-cucumber-help.md
107
+ - features-skeleton/actual_images/test.png
108
+ - features-skeleton/expected_images/test.png
109
+ - features-skeleton/image_difference/test.png
110
+ - features-skeleton/my_first.feature
111
+ - features-skeleton/screenshots/test.png
112
+ - features-skeleton/step_definitions/custom_steps.rb
113
+ - features-skeleton/support/env.rb
114
+ - features-skeleton/support/hooks.rb
115
+ - example/android/android_app/android_app_calculator/AndroidCalculator.apk
116
+ - example/android/android_app/android_app_calculator/features/actual_images/test.png
117
+ - example/android/android_app/android_app_calculator/features/calculator.feature
118
+ - example/android/android_app/android_app_calculator/features/expected_images/test.png
119
+ - example/android/android_app/android_app_calculator/features/image_difference/test.png
120
+ - example/android/android_app/android_app_calculator/features/my_first.feature
121
+ - example/android/android_app/android_app_calculator/features/screenshots/test.png
122
+ - example/android/android_app/android_app_calculator/features/step_definitions/custom_steps.rb
123
+ - example/android/android_app/android_app_calculator/features/support/env.rb
124
+ - example/android/android_app/android_app_calculator/features/support/hooks.rb
125
+ - example/android/android_app/android_app_calculator.zip
126
+ - example/android/android_app/HinduCalendar/features/01_HC_homepage_menu_validation.feature
127
+ - example/android/android_app/HinduCalendar/features/02_HC_homepage_menu_navigation.feature
128
+ - example/android/android_app/HinduCalendar/features/03_HC_Create_Save_View_Delete_Kundali.feature
129
+ - example/android/android_app/HinduCalendar/features/actual_images/test.png
130
+ - example/android/android_app/HinduCalendar/features/expected_images/test.png
131
+ - example/android/android_app/HinduCalendar/features/image_difference/test.png
132
+ - example/android/android_app/HinduCalendar/features/my_first.feature
133
+ - example/android/android_app/HinduCalendar/features/screenshots/test.png
134
+ - example/android/android_app/HinduCalendar/features/step_definitions/01_HC_homepage_menu_validation.rb
135
+ - example/android/android_app/HinduCalendar/features/step_definitions/02_HC_homepage_menu_navigation.rb
136
+ - example/android/android_app/HinduCalendar/features/step_definitions/03_HC_Create_Save_View_Delete_Kundali.rb
137
+ - example/android/android_app/HinduCalendar/features/step_definitions/custom_steps.rb
138
+ - example/android/android_app/HinduCalendar/features/support/env.rb
139
+ - example/android/android_app/HinduCalendar/features/support/hooks.rb
140
+ - example/android/android_app/HinduCalendar/HinduCalendar.apk
141
+ - example/android/android_app/HinduCalendar/README.md
142
+ - example/android/android_app/HinduCalendar/Results.html
143
+ - example/android/android_app/HinduCalendar.zip
144
+ - example/android/android_web/android_web_gmail_login/features/actual_images/test.png
145
+ - example/android/android_web/android_web_gmail_login/features/expected_images/test.png
146
+ - example/android/android_web/android_web_gmail_login/features/gmail_login.feature
147
+ - example/android/android_web/android_web_gmail_login/features/image_difference/test.png
148
+ - example/android/android_web/android_web_gmail_login/features/my_first.feature
149
+ - example/android/android_web/android_web_gmail_login/features/screenshots/test.png
150
+ - example/android/android_web/android_web_gmail_login/features/step_definitions/custom_steps.rb
151
+ - example/android/android_web/android_web_gmail_login/features/support/env.rb
152
+ - example/android/android_web/android_web_gmail_login/features/support/hooks.rb
153
+ - example/android/android_web/android_web_gmail_login.zip
154
+ - example/desktop web/desktop_web_gmail_login/features/actual_images/test.png
155
+ - example/desktop web/desktop_web_gmail_login/features/expected_images/test.png
156
+ - example/desktop web/desktop_web_gmail_login/features/gmail_login.feature
157
+ - example/desktop web/desktop_web_gmail_login/features/gmail_multi_login.feature
158
+ - example/desktop web/desktop_web_gmail_login/features/image_difference/test.png
159
+ - example/desktop web/desktop_web_gmail_login/features/my_first.feature
160
+ - example/desktop web/desktop_web_gmail_login/features/result.html
161
+ - example/desktop web/desktop_web_gmail_login/features/screenshots/test.png
162
+ - example/desktop web/desktop_web_gmail_login/features/step_definitions/custom_steps.rb
163
+ - example/desktop web/desktop_web_gmail_login/features/support/env.rb
164
+ - example/desktop web/desktop_web_gmail_login/features/support/hooks.rb
165
+ - example/desktop web/desktop_web_gmail_login/result.html
166
+ - example/desktop web/desktop_web_gmail_login.zip
139
167
  homepage: http://seleniumcucumber.info/
140
168
  licenses:
141
169
  - MIT
@@ -156,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
184
  version: '0'
157
185
  requirements: []
158
186
  rubyforge_project:
159
- rubygems_version: 2.4.6
187
+ rubygems_version: 2.0.14
160
188
  signing_key:
161
189
  specification_version: 4
162
190
  summary: SELENIUM WEBDRIVER WITH RUBY & CUCUMBER