ohammersmith-webrat 0.4.4.98 → 0.4.4.100

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ module Webrat
7
7
  class WebratError < StandardError
8
8
  end
9
9
 
10
- VERSION = '0.4.4'
10
+ VERSION = '0.4.4.100'
11
11
 
12
12
  def self.require_xml
13
13
  gem "nokogiri", ">= 1.0.6"
@@ -53,6 +53,9 @@ module Webrat
53
53
 
54
54
  # Set the key that Selenium uses to determine the browser running. Default *firefox
55
55
  attr_accessor :selenium_browser_key
56
+
57
+ # Set the javascript framework that tells Selenium how to wait for Ajax events
58
+ attr_accessor :selenium_javascript_framework
56
59
 
57
60
  # How many redirects to the same URL should be halted as an infinite redirect
58
61
  # loop? Defaults to 10
@@ -68,6 +71,7 @@ module Webrat
68
71
  self.selenium_server_port = 4444
69
72
  self.infinite_redirect_limit = 10
70
73
  self.selenium_browser_key = '*firefox'
74
+ self.selenium_javascript_framework = :prototype
71
75
  end
72
76
 
73
77
  def parse_with_nokogiri? #:nodoc:
@@ -146,8 +146,8 @@ module Webrat
146
146
  end
147
147
 
148
148
  select date.year, :from => "#{id_prefix}_#{DATE_TIME_SUFFIXES[:year]}"
149
- select date.strftime('%B'), :from => "#{id_prefix}_#{DATE_TIME_SUFFIXES[:month]}"
150
- select date.day, :from => "#{id_prefix}_#{DATE_TIME_SUFFIXES[:day]}"
149
+ select date.strftime('%B'), :from => "#{id_prefix}_#{DATE_TIME_SUFFIXES[:month]}" unless options[:discard_month]
150
+ select date.day, :from => "#{id_prefix}_#{DATE_TIME_SUFFIXES[:day]}" unless options[:discard_day]
151
151
  end
152
152
 
153
153
  webrat_deprecate :selects_date, :select_date
@@ -205,8 +205,12 @@ module Webrat
205
205
 
206
206
 
207
207
  def create_browser
208
- $browser = ::Selenium::Client::Driver.new(Webrat.configuration.selenium_server_address || "localhost",
209
- Webrat.configuration.selenium_server_port, Webrat.configuration.selenium_browser_key, "http://#{Webrat.configuration.application_address}:#{Webrat.configuration.application_port}")
208
+ $browser = ::Selenium::Client::Driver.new(
209
+ {:host => Webrat.configuration.selenium_server_address || "localhost",
210
+ :port => Webrat.configuration.selenium_server_port,
211
+ :browser => Webrat.configuration.selenium_browser_key,
212
+ :url => "http://#{Webrat.configuration.application_address}:#{Webrat.configuration.application_port}",
213
+ :default_javascript_framework => Webrat.configuration.selenium_javascript_framework})
210
214
  $browser.set_speed(0) unless Webrat.configuration.selenium_server_address
211
215
 
212
216
  at_exit do
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ohammersmith-webrat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4.98
4
+ version: 0.4.4.100
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Helmkamp