Added fire_event wrapper in Selenium sessions

This commit is contained in:
Nando 2008-08-11 20:33:01 +02:00 committed by Bryan Helmkamp
parent 6ccb8a6c3a
commit db81a97e42
1 changed files with 6 additions and 1 deletions

View File

@ -109,7 +109,12 @@ module Webrat
def dragdrop(*args) #:nodoc:
@selenium.dragdrop(*args)
end
def fire_event(field_identifier, event)
locator = "webrat=#{Regexp.escape(field_identifier)}"
@selenium.fire_event(locator, "#{event}")
end
protected
def adjust_if_regexp(text_or_regexp) #:nodoc: