I would like to simulate a user pressing shift-enter in a text area. Here is the code I am working with:
var driver = new FirefoxDriver();
driver.Navigate().
If there's something that you might do over and over, it may be worth making an extension method for it. I did this since .Clear() doesn't work in our web app for some reason. Instead of always sending a CTRL+A and \b, I just extended it with this:
public static class ExtensionMethods
{
public static void Blank(this IWebElement _el)
{
_el.SendKeys(Keys.Control + "a");
_el.SendKeys("\b");
}
}
Then I just call dynEl.Blank(); and it works great.