bugfix: selenium's wait_for_element method takes the number of seconds before timing out from an option hash

Signed-off-by: Balint Erdi <balint.erdi@gmail.com>
This commit is contained in:
Balint Erdi 2009-03-24 00:33:16 +01:00 committed by Bryan Helmkamp
parent e2a672a767
commit cd49c2d939
1 changed files with 7 additions and 7 deletions

View File

@ -39,7 +39,7 @@ module Webrat
def fill_in(field_identifier, options)
locator = "webrat=#{Regexp.escape(field_identifier)}"
selenium.wait_for_element locator, 5
selenium.wait_for_element locator, :timeout_in_seconds => 5
selenium.type(locator, "#{options[:with]}")
end
@ -62,7 +62,7 @@ module Webrat
pattern ||= '*'
locator = "button=#{pattern}"
selenium.wait_for_element locator, 5
selenium.wait_for_element locator, :timeout_in_seconds => 5
selenium.click locator
end
@ -71,7 +71,7 @@ module Webrat
def click_link(link_text_or_regexp, options = {})
pattern = adjust_if_regexp(link_text_or_regexp)
locator = "webratlink=#{pattern}"
selenium.wait_for_element locator, 5
selenium.wait_for_element locator, :timeout_in_seconds => 5
selenium.click locator
end
@ -79,7 +79,7 @@ module Webrat
def click_link_within(selector, link_text, options = {})
locator = "webratlinkwithin=#{selector}|#{link_text}"
selenium.wait_for_element locator, 5
selenium.wait_for_element locator, :timeout_in_seconds => 5
selenium.click locator
end
@ -94,7 +94,7 @@ module Webrat
select_locator = "webratselectwithoption=#{option_text}"
end
selenium.wait_for_element select_locator, 5
selenium.wait_for_element select_locator, :timeout_in_seconds => 5
selenium.select(select_locator, option_text)
end
@ -102,7 +102,7 @@ module Webrat
def choose(label_text)
locator = "webrat=#{label_text}"
selenium.wait_for_element locator, 5
selenium.wait_for_element locator, :timeout_in_seconds => 5
selenium.click locator
end
@ -110,7 +110,7 @@ module Webrat
def check(label_text)
locator = "webrat=#{label_text}"
selenium.wait_for_element locator, 5
selenium.wait_for_element locator, :timeout_in_seconds => 5
selenium.click locator
end
alias_method :uncheck, :check