rwebspec-webdriver 0.5 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,6 +1,9 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ == 0.5.1
5
+ [Enhancement] deprecate try_until, use try_for
6
+
4
7
  == 0.5
5
8
  [Enhancement] select_option with faster syntax
6
9
  [Refactor] Separate pause from operation_delay
data/Rakefile CHANGED
@@ -69,7 +69,7 @@ end
69
69
  spec = Gem::Specification.new do |s|
70
70
  s.platform= Gem::Platform::RUBY
71
71
  s.name = "rwebspec-webdriver"
72
- s.version = "0.5"
72
+ s.version = "0.5.1"
73
73
  s.summary = "Executable functional specification for web applications in RSpec syntax and Selenium-WebDriver"
74
74
  # s.description = ""
75
75
 
@@ -90,13 +90,13 @@ module RWebSpec
90
90
 
91
91
  # TODO: syntax
92
92
 
93
- # Try the operation up to specified timeout (in seconds), and sleep given interval (in seconds).
94
- # Error will be ignored until timeout
95
- # Example
96
- # try { click_link('waiting')}
97
- # try(10, 2) { click_button('Search' } # try to click the 'Search' button upto 10 seconds, try every 2 seconds
98
- # try { click_button('Search' }
99
- def try_until(timeout = $testwise_polling_timeout, polling_interval = $testwise_polling_interval || 1, & block)
93
+ # Try the operation up to specified timeout (in seconds), and sleep given interval (in seconds).
94
+ # Error will be ignored until timeout
95
+ # Example
96
+ # try_for { click_link('waiting')}
97
+ # try_for(10, 2) { click_button('Search' } # try to click the 'Search' button upto 10 seconds, try every 2 seconds
98
+ # try_for { click_button('Search' }
99
+ def try_for(timeout = $testwise_polling_timeout, polling_interval = $testwise_polling_interval || 1, & block)
100
100
  start_time = Time.now
101
101
 
102
102
  last_error = nil
@@ -114,8 +114,10 @@ module RWebSpec
114
114
  raise "Timeout after #{duration.to_i} seconds."
115
115
  end
116
116
 
117
- alias try_upto try_until
118
-
117
+ alias try_upto try_for
118
+ alias try_up_to try_for
119
+ alias try_until try_for
120
+
119
121
  def try(timeout = $testwise_polling_timeout, polling_interval = $testwise_polling_interval || 1, &block)
120
122
  puts "Warning: method 'try' is deprecated (won't support in RWebSpec 3), use try_until instead."
121
123
  try_until(timeout, polling_interval) {
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rwebspec-webdriver
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- version: "0.5"
9
+ - 1
10
+ version: 0.5.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Zhimin Zhan
@@ -14,7 +15,7 @@ autorequire: rwebspec-webdriver
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2012-08-13 00:00:00 Z
18
+ date: 2012-08-16 00:00:00 Z
18
19
  dependencies:
19
20
  - !ruby/object:Gem::Dependency
20
21
  name: rspec