An NDoc Documented Class Library |

# DefaultSelenium.TypeKeys Method

Simulates keystroke events on the specified element, as though you typed the value key-by-key.

This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string; this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.

Unlike the simple "type" command, which forces the specified value into the page directly, this command may or may not have any visible effect, even in cases where typing keys would normally have a visible effect. For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in the field.

In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to send the keystroke events corresponding to what you just typed.

public void TypeKeys(
string locator,
string value
);

#### Parameters

locator
  an element locator
value
  the value to type

#### Implements

ISelenium.TypeKeys

#### See Also

DefaultSelenium Class | Selenium Namespace