I have written a sample code to launch IE browser
and load google page.
public class Sample {
public static void main(String[] args)
{
// TODO Auto-generated method stub
System.setProperty("webdriver.ie.driver","H:/IEDriverServer.exe");
WebDriver driver=new InternetExplorerDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
driver.get("http://www.google.com");
}
}
But when I run this script it launches browser and it gets closed immediately (less than 2 sec) without prompting any error and the script wont terminates.
This is what I can see on console screen:
Started
InternetExplorerDriver
server (32-bit)2.53.1.0
Listening on port 46974
Only local connections are allowed
Can any one help me on this issue?
Below steps are worked for me, Hope this will work for you as well: