Skip to content

Commit

Permalink
Added fire_event wrapper in Selenium sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
nando authored and brynary committed Nov 14, 2008
1 parent 6ccb8a6 commit db81a97
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/webrat/selenium/selenium_session.rb
Expand Up @@ -109,7 +109,12 @@ def is_ordered(*args) #:nodoc:
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:
Expand Down

0 comments on commit db81a97

Please sign in to comment.