Posts

Showing posts from 2015

Selenium WebDriver with IE- Unable to Get browser Exception (workaround)

When you run your tests with Internet Explorer and have a restriction of not modifying the IE Settings as recommened as below. On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode". At some point of time, while switching between windows WebDriver throws "Unable to get browser" Exception.  After many probable methods of fixing the issue. Here is the solution that worked for me. //Initially setting the window id to null.  String window=null;    //Setting the maximum wait time for the browser window to open     long waittime=8000;  Long start=System.currentTimeMillis();