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.
Try this:
import org.openqa.selenium.Keys
WebElement.sendKeys(Keys.RETURN)
References:
Typing Enter/Return key in Selenium
http://asynchrony.blogspot.com/2008/11/enter-key-press-in-selenium.html
Hope this helps.
This is how it done with C#:
webElement.SendKeys(Keys.Return);