I am using Selenium 3.12,gecko driver version-21 and i have Firefox-61 installed on my system.
I am trying to launch Firefox using the code below:
System.setProperty("java.net.preferIPv4Stack" , "true");
System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir") + "\\geckodriver.exe");
FirefoxOptions options = new FirefoxOptions();
options.setCapability("marionette", true);
options.setLogLevel(FirefoxDriverLogLevel.TRACE);
options.setBinary("C:\\Program Files\\Mozilla Firefox\\firefox.exe");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile fxProfile = profile.getProfile("xyzProfile");
fxProfile.setPreference(FirefoxProfile.PORT_PREFERENCE,7056);
driver = new FirefoxDriver(options);
However i am getting the below error and not able to even launch the browser-
org.openqa.selenium.WebDriverException: java.net.SocketException: Software caused connection abort: recv failed Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z' System info: host: 'INDA201695', ip: '10.164.59.166', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131' Driver info: driver.version: FirefoxDriver
Please help as to what is causing this error and how can i fix the same?
trying to launch Firefox
? Using new/existingFirefoxProfile
? What is your exact usecase? – DebanjanB