Added key_down and key_up wrapper in Selenium session
This commit is contained in:
parent
db81a97e42
commit
92b4814392
@ -115,6 +115,16 @@ module Webrat
|
|||||||
@selenium.fire_event(locator, "#{event}")
|
@selenium.fire_event(locator, "#{event}")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def key_down(field_identifier, key_code)
|
||||||
|
locator = "webrat=#{Regexp.escape(field_identifier)}"
|
||||||
|
@selenium.key_down(locator, key_code)
|
||||||
|
end
|
||||||
|
|
||||||
|
def key_up(field_identifier, key_code)
|
||||||
|
locator = "webrat=#{Regexp.escape(field_identifier)}"
|
||||||
|
@selenium.key_up(locator, key_code)
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def adjust_if_regexp(text_or_regexp) #:nodoc:
|
def adjust_if_regexp(text_or_regexp) #:nodoc:
|
||||||
|
Loading…
Reference in New Issue
Block a user