0
DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("marionette", true); FirefoxOptions option= new FirefoxOptions(); option.merge(capabilities); WebDriverManager.firefoxdriver().setup(); WebDriver driver = new FirefoxDriver(option); driver.manage().window().maximize(); driver.get("https://www.google.com/"); 

I am getting this error

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:565) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:157) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:110) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:98) at com.app.selenium.OpenBrowser.main(OpenBrowser.java:27) Caused by: org.openqa.selenium.WebDriverException: Driver server process died prematurely. Build info: version: '4.4.0', revision: 'e5c75ed026a' Driver info: driver.version: FirefoxDriver at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:226) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:98) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:547) ... 5 more

Code for instantiating firefox, i have tried everything but i keep getting this error, Not able to open Firefox through selenium Firefox version- 112.0.1

I am facing issue with only firefox, chrome and edge are working

1 Answer 1

0

issue resolved it was a compatibility issue. i had to give driverVersion in webdriver manager as latest firefox driver was not compatible with the browser i installed

Sign up to request clarification or add additional context in comments.

1 Comment

You can mark your own answer as accepted.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.