tags:

views:

72

answers:

1

Hi

How can i clear the contents of an input field using ruby selenium?

i.e when page loads up there are values in the input filed but i want to replace them with new ones.

thank you

+2  A: 

Come on guys... You can't be serious...

With selenium to clear an input field do this: selenium.type("") in ruby too.

And backspacing as many times as there are letters... Come on.. you don't do stuff like that.

Or in Ruby syntax: @browser.type "idofthefield", ""

Hannibal
thanks, I thought that selenium.type("") would just add nothing to the input already there. thanks
Mo