You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a 'detach' flag to leave Firefox running after Geckodriver exits #2247
We have a Selenium test runner that intentionally leaves browser windows open for manual inspection when running locally.
Now that Geckodriver automatically quits Firefox when it exits, this is no longer possible.
Would it be possible to add a detach option similar to Chromedriver in order to opt in to leaving the browser running?
Which signal are you sending? I assume it's SIGINT at the moment? Why can't you just send SIGKILL to the process, which cannot be handled by geckodriver?
So how did your Selenium testrunner handle it for geckodriver < 0.37.0? Somehow geckodriver must have been killed to keep Firefox running. A normal exit of geckodriver always quits the session first.
FirefoxDriverServicedriverService = newGeckoDriverService.Builder().build();
FirefoxDriverdriver = newFirefoxDriver(driverService);
/* do some testing */driverService.stop();
/* Firefox window is left open with geckodriver < 0.37.0 */
Activity
whimboo commentedon Jun 9, 2026
Which signal are you sending? I assume it's
SIGINTat the moment? Why can't you just sendSIGKILLto the process, which cannot be handled by geckodriver?labkey-tchad commentedon Jun 9, 2026
I'm launching Geckodriver via Selenium WebDriver for Java. As far as I can tell, it doesn't provide that level of control over the driver lifecycle.
whimboo commentedon Jun 9, 2026
So how did your Selenium testrunner handle it for geckodriver < 0.37.0? Somehow geckodriver must have been killed to keep Firefox running. A normal exit of geckodriver always quits the session first.
labkey-tchad commentedon Jun 9, 2026
Something like this:
whimboo commentedon Jun 10, 2026
Ok, I did some more investigation of the Selenium code and it first tries to use SIGTERM to shutdown the driver. For further discussions I filed https://bugzilla.mozilla.org/show_bug.cgi?id=2046321.
Leave browser windows open after test failures (#3074)