I'm using Selenium 2 on Windows to automate firefox. I tried to send 'Alt+Esc' to the browser to minimise it on start. However firefox keeps typing the '{%ESC}' in its address bar. What should I do? thanks.
using (driver = new FirefoxDriver(firefoxProfile))
{
driver.Keyboard.SendKeys("{%ESC}");
}
I use this to open a new window (with the keyboard input) and it works just fine
IWebDriver driver = new FirefoxDriver();
Actions action = new Actions(driver);
action.SendKeys(OpenQA.Selenium.Keys.Control + "n").Build().Perform();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With