Friday, June 7, 2013

How to type a word in text box in Selenium RC

To type a word in text box or text area we have to use the below command.

Syntax:

Sets the value of an input field, as though you typed it in.  Can also be used to set the value of
combo boxes, check boxes, etc. In these cases, value should be the value of the option selected,
not the visible text.
Parameters:
locator an element locator
value the value to type
Usage:
Selenium.type(“locator”, “value”);
Selenium.type(“id=123”, “selenium”);
For sample script, please go through the script TextBox.java

No comments:

Post a Comment