I believe sendkeys also works for watir-webdriver.  you can even use
it to do things like paste text into that area.

text_area.send_keys [:control, 'v']

The full list of keys you can send can be found here:
http://selenium.googlecode.com/svn/trunk/rb/lib/selenium/webdriver/common/keys.rb

(credit to Jari for providing that link, and the above example of the
ctrl-v  in another thread earlier)

On Apr 21, 10:15 am, orde <[email protected]> wrote:
> You should able to accomplish it through either .fire_event
> or .send_keys methods.  Examples:
>
> fire_event:http://rdoc.info/gems/watir/1.8.1/Watir/Element#fire_event-instance_m...
> send_keys:http://rdoc.info/gems/watir/1.8.1/Watir/IE#send_keys-instance_method
>
> But I think that send_keys only works with IE.  Hope it helps.
>
> orde
>
> On Apr 21, 2:55 am, Alastair Montgomery <[email protected]> wrote:
>
>
>
>
>
>
>
> > Having talked with our developers we would only need to be able to fire the
> > following events;
> > keydown, keyup, mousedown, mouseup and paste.
>
> > So really need a way of being able to pass a key code with the keydown and
> > keyup events for WATIR and FIREWATIR?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to