0

I'm using watir to automate a task. After being logged in, i need to enter a text, my cursor is already on the message window so no need to locate the element, just need to type my text and send(:enter).
By the way, i can not locate the input bar.

So is there a command to tell watir to enter text without locating an element ?

1 Answers1

1

Yes, just use Browser#send_keys, this should work:

browser.send_keys ['hello', :ENTER]
titusfortner
  • 4,099
  • 2
  • 15
  • 29