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
@@ -0,0 +1,5 @@
1
+ require_relative 'methods/screenshot_methods'
2
+
3
+ Then(/^I take screenshot$/) do
4
+ take_screenshot
5
+ end
@@ -1,5 +1,5 @@
1
1
  module Selenium
2
2
  module Cucumber
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-15 00:00:00.000000000 Z
12
+ date: 2014-06-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber
@@ -43,7 +43,9 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
- description: A BDD approch to write automated test script for testing web application.
46
+ description: ! "Selenium-cucumber is a behavior driven development (BDD) approach
47
+ to write automation test script to test web applications.\n It
48
+ enables you to write and execute automated acceptance tests of web apps."
47
49
  email: sameersawant1992@gmail.com
48
50
  executables:
49
51
  - selenium-cucumber
@@ -52,17 +54,22 @@ extra_rdoc_files: []
52
54
  files:
53
55
  - lib/selenium-cucumber.rb
54
56
  - lib/selenium-cucumber/assertion_steps.rb
55
- - lib/selenium-cucumber/enter_text_steps.rb
57
+ - lib/selenium-cucumber/configuration_steps.rb
58
+ - lib/selenium-cucumber/input_steps.rb
59
+ - lib/selenium-cucumber/javascript_handling_steps.rb
56
60
  - lib/selenium-cucumber/navigation_steps.rb
57
61
  - lib/selenium-cucumber/press_button_steps.rb
58
- - lib/selenium-cucumber/progress_step.rb
59
- - lib/selenium-cucumber/screenshot_step.rb
62
+ - lib/selenium-cucumber/progress_steps.rb
63
+ - lib/selenium-cucumber/screenshot_steps.rb
60
64
  - lib/selenium-cucumber/version.rb
61
65
  - lib/selenium-cucumber/methods/assertion_methods.rb
62
- - lib/selenium-cucumber/methods/enter_text_methods.rb
66
+ - lib/selenium-cucumber/methods/configuration_methods.rb
67
+ - lib/selenium-cucumber/methods/input_methods.rb
68
+ - lib/selenium-cucumber/methods/javascript_handling_methods.rb
63
69
  - lib/selenium-cucumber/methods/navigate_methods.rb
64
70
  - lib/selenium-cucumber/methods/press_button_methods.rb
65
71
  - lib/selenium-cucumber/methods/progress_methods.rb
72
+ - lib/selenium-cucumber/methods/screenshot_methods.rb
66
73
  - bin/generate.rb
67
74
  - bin/helper.rb
68
75
  - features-skeleton/my_first.feature
@@ -72,9 +79,10 @@ files:
72
79
  - doc/installation.md
73
80
  - doc/selenium-cucumber-help.txt
74
81
  - bin/selenium-cucumber
75
- homepage: http://sameersawant1992.wordpress.com/
76
- licenses: []
77
- post_install_message:
82
+ homepage: http://seleniumcucumber.wordpress.com/
83
+ licenses:
84
+ - MIT
85
+ post_install_message: Thanks for installing selenium-cucumber gem.
78
86
  rdoc_options: []
79
87
  require_paths:
80
88
  - lib
@@ -95,5 +103,5 @@ rubyforge_project:
95
103
  rubygems_version: 1.8.28
96
104
  signing_key:
97
105
  specification_version: 3
98
- summary: SELENIUM WEBDRIVER 2.0 WITH RUBY & CUCUMBER
106
+ summary: SELENIUM WEBDRIVER WITH RUBY & CUCUMBER
99
107
  test_files: []
@@ -1,27 +0,0 @@
1
- require_relative 'methods/enter_text_methods'
2
-
3
- #input field
4
- Then /^I enter "([^\"]*)" into input field with id "([^\"]*)"$/ do |text, id|
5
- enter_text("id",text,id)
6
- end
7
-
8
- Then /^I enter "([^\"]*)" into input field with name "([^\"]*)"$/ do |text, name|
9
- enter_text("name",text,name)
10
- end
11
-
12
- Then /^I enter "([^\"]*)" into input field with xpath "([^\"]*)"$/ do |text, xpath|
13
- enter_text("xpath",text,xpath)
14
- end
15
-
16
- Then /^I clear input field with id "([^\"]*)"$/ do |id|
17
- clear_text("id",id)
18
- end
19
-
20
- Then /^I clear input field with name "([^\"]*)"$/ do |name|
21
- clear_text("name",name)
22
- end
23
-
24
- Then /^I clear input field with xpath "([^\"]*)"$/ do |xpath|
25
- clear_text("xpath",xpath)
26
- end
27
-
@@ -1,14 +0,0 @@
1
- require 'rubygems'
2
- require "selenium-webdriver"
3
-
4
-
5
- def enter_text(access_type,text,access_name)
6
- element = $driver.find_element(:"#{access_type}" => "#{access_name}").send_keys text
7
- end
8
-
9
- def clear_text(access_type,access_name)
10
- element = $driver.find_element(:"#{access_type}" => "#{access_name}").clear
11
- end
12
-
13
-
14
-
@@ -1,17 +0,0 @@
1
- require_relative 'methods/progress_methods'
2
-
3
- Then(/^I wait for (\d+) sec$/) do |time|
4
- sleep time.to_i
5
- end
6
-
7
- Then(/^I wait "(.*?)" second for element having id "(.*?)"$/) do |duration, id|
8
- wait_for_element("id",id,duration)
9
- end
10
-
11
- Then(/^I wait "(.*?)" second for element having name "(.*?)"$/) do |duration, name|
12
- wait_for_element("name",name,duration)
13
- end
14
-
15
- Then(/^I wait "(.*?)" second for element having xpath "(.*?)"$/) do |duration, xpath|
16
- wait_for_element("xpath",xpath,duration)
17
- end
@@ -1,8 +0,0 @@
1
- require 'rubygems'
2
- require "selenium-webdriver"
3
-
4
-
5
- Then(/^I take screenshot$/) do
6
- curTime = Time.now.strftime('%Y%m%d%H%M%S%L')
7
- $driver.save_screenshot('./screenshot'+curTime+'.png')
8
- end