Press Enter Key in Selenium RC with C# Press Enter Key in Selenium RC with C# selenium selenium

Press Enter Key in Selenium RC with C#


This can be achieved by Keys, and Enter.

Example in Java as I don't know C#:

import org.openqa.selenium.Keys;//...// this sends an Enter to the elementselenium.type("locator", Keys.ENTER);// or even this - this sends the "Any text" and then confirms it with Enterselenium.type("locator", "Any text" + Keys.ENTER);

From the Keys enum.


This is how it done with C#:

webElement.SendKeys(Keys.Return);