I am using the below code to create a firefox web driver using Selenium Java API.But it neither create firefox instance nor gives any error message.Control comes directly to finally block after some time.
Java APi used - 2.46.0 Firefox version - 32.0.1 JRE -1.8.25
Can some one help me to debug the issue?
code -
WebDriver driver;
try{
ProfilesIni profile = new ProfilesIni(); //ignore ietab+options
FirefoxProfile defualtProfile = profile.getProfile("default");
//defualtProfile.setAcceptUntrustedCertificates(false);
DesiredCapabilities capabilities = DesiredCapabilities.firefox(); //To over come ssl certificate error
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setCapability(FirefoxDriver.PROFILE,defualtProfile);
Thread.sleep((long)(2000*Math.random()));
driver=new FirefoxDriver(capabilities);
return driver;
}
catch(Exception ex)
{
logger.error("Exception - > " + ex.toString());
return null;
}
finally
{
logger.info("End");
}