Q. How do I enter text in a text box?

A. Use the text_field in conjunction with the .set command
Example html:

<html>
    <body>
      <form method="post" action="">
         <textarea name="comments" cols="20" rows="1">
            Enter your comments here...
         </textarea><br />
         <input type="submit" value="Submit" />
      </form>
    </body>
</html>

Example watir:

@b.text_field(:name, "comments").set("just_add_watir rocks!")
Social tagging: >

Comments are closed.