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.
data/lib/webrat.rb
CHANGED
@@ -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:
|
data/lib/webrat/core/scope.rb
CHANGED
@@ -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(
|
209
|
-
|
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
|
data/vendor/selenium-server.jar
CHANGED
Binary file
|