I am using Selenium PhantomJS. When my program starts it opens command prompt (cmd) which then turns on the browser and does everything I have programmed it to do.
According to this answer there is no way to hide the command prompt (until v2.4 gets released), so I want to ask if there is a way to at least start it minimized or maybe stop Windows from focusing it after it pops up.
I tried the following code to programmatically press Alt+Tab
:
IWebDriver driver = new PhantomJSDriver(); //this starts browser and opens cmd
System.Windows.Forms.SendKeys.Send("%{TAB}");//alt+tab
Unfortunately this only freezes the mouse as if I am in endless loop until the program ends.
I am using Windows 7, VS2013.