Reputation: 125
My PC:
Win 7 / 64 Bit - all updates installed
FireFox 60.0 / 64 Bit
Java 10.0.1
Selenium 3.12
Geckodriver 0.20.1 / 64 Bit
Eclipse 4.7.3a
JAVA-Sourcecode:
public class SeleniumFireFoxMinimal1 {
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.gecko.driver", "e:\\geckodriverwrapper.bat");
WebDriver driver = new FirefoxDriver();
driver.get("http://www.toolsqa.com");
driver.quit();
}
}
geckodriverwrapper.bat:
@ECHO OFF
ECHO Starting geckodriver: %0 %*
E:\geckodriver.exe --log trace %* > NUL 2>&1
Eclipse console output:
Starting geckodriver: E:\geckodriverwrapper.bat --port=27751 -b "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
Mai 12, 2018 1:14:15 VORM. org.openqa.selenium.remote.ProtocolHandshake createSession
INFORMATION: Detected dialect: W3C
The following lines are shown 15s after the Firefox window is closed:
Mai 12, 2018 1:14:37 VORM. org.openqa.selenium.os.OsProcess destroy
INFORMATION: Unable to drain process streams. Ignoring but the exception being swallowed follows.
org.apache.commons.exec.ExecuteException: The stop timeout of 2000 ms was exceeded (Exit value: -559038737)
at org.apache.commons.exec.PumpStreamHandler.stopThread(PumpStreamHandler.java:295)
at org.apache.commons.exec.PumpStreamHandler.stop(PumpStreamHandler.java:181)
at org.openqa.selenium.os.OsProcess.destroy(OsProcess.java:135)
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:153)
at org.openqa.selenium.remote.service.DriverService.stop(DriverService.java:222)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:95)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:443)
at at.xxxxxxx.work.SeleniumFireFoxMinimal1.main(SeleniumFireFoxMinimal1.java:40)
Mai 12, 2018 1:14:37 VORM. org.openqa.selenium.os.OsProcess destroy
SCHWERWIEGEND: Unable to kill process Process[pid=4320, exitValue=1]
Other Selenium commands like these work perfectly well:
element = driver.findElement(By.id("sinp"));
element.clear();
element.sendKeys("black");
element.submit();
Is this just a problem on my PC ?
driver.quit()
is working on InternetExplorer without a problem.
Maybe we have to reopen this issue?:
https://github.com/SeleniumHQ/selenium/issues/4678
https://github.com/mozilla/geckodriver/issues/954
https://bugzilla.mozilla.org/show_bug.cgi?id=1401109
Now (15th May 2018) I've posted it here too:
https://github.com/mozilla/geckodriver/issues/1272
Upvotes: 3
Views: 1979
Reputation: 1212
I don't have a clean solution, but a workaround: I changed driver.quit()
to driver.close()
.
This is usually used to close a window. But if it's the last window it works. Tested with
Upvotes: 3