Joe Stoner
Joe Stoner

Reputation: 125

Selenium 3.2.0 crashes FireFox 52 during driver.quit() @ Win 7 Home Premium & GeckoDriver 0.14.0

Win 7 and FireFox is running in German language. Win 7 has all available updates installed. Same for 32 and 64 Bit GeckoDriver! (my Win 7 ist 64 Bit; my FireFox is 32 Bit). Is this just a problem on my PC ?

driver.quit() is working on my InternetExplorer without a problem.

package JS_JFrame1;                                       

import org.openqa.selenium.WebDriver;                     
import org.openqa.selenium.firefox.FirefoxDriver;        

public class SeleniumFireFoxMinimal1 {  



public static void main(String[] args) throws InterruptedException {

    System.setProperty("webdriver.gecko.driver", "e:\\geckodriver.exe");

    WebDriver driver = new FirefoxDriver();                 

    driver.get("http://www.toolsqa.com");                    

    Thread.sleep(5000);                                   

    driver.quit();                                        

    }

}

Other Selenium commands like these work perfectly well:

element = driver.findElement(By.id("sinp"));              

System.out.println( "Element found!");                   

element.clear();                                                

element.sendKeys("black");                                      

element.submit();                                                       

Eclipse Console-Output:

1488978842009 addons.manager DEBUG Completed startup sequence 1488978842565 Marionette INFO Listening on port 52628 1488978843470 addons.manager DEBUG Starting provider: 1488978843470 addons.manager DEBUG Registering shutdown blocker for 1488978843471 addons.manager DEBUG Provider finished startup: 1488978843514 addons.manager DEBUG Starting provider: PreviousExperimentProvider 1488978843515 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider 1488978843515 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider 1488978843519 DeferredSave.extensions.json DEBUG Starting write 1488978843910 DeferredSave.extensions.json DEBUG Write succeeded 1488978843910 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 19 Mär 08, 2017 2:14:06 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFORMATION: Detected dialect: W3C 1488978859017 Marionette INFO New connections will no longer be accepted [Child 6128] ###!!! ABORT: Aborting on channel error.: file c:/builds/moz2_slave/m-rel-w32-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2143 Mär 08, 2017 2:14:20 PM org.openqa.selenium.os.UnixProcess destroy SCHWERWIEGEND: Unable to kill process with PID 4732

Hardcopy of the FireFox-Crash-Popup:

https://www.dropbox.com/s/f3cuklcsgdbqcyx/FireFox_52_CrashPopup.PNG?dl=0

Report at GitHub:

https://github.com/mozilla/geckodriver/issues/517

Upvotes: 1

Views: 2549

Answers (2)

Roshan
Roshan

Reputation: 1

When you say your firefox crashes,if this the pop up that the browser gives FireFox has stopped working then the following solution worked for me.

  1. Go to this link http://www.guru99.com/use-autoit-selenium.html to know about and download Auto IT. Basically it allows you to automate windows GUI.
  2. You have to create an exe file using AutoIT which you will add to your selenium script to close the pop up.
  3. Read on the above link how to download and open AutoIT script creator. You can create your own script or use the one below :

    ControlFocus("Firefox","","DirectUIHWND") ControlFocus("Firefox","","Button2") ControlClick("Firefox","","Button2")

  4. Compile an exe and add it to your project.

  5. Run the following script in the end i.e. after you use the driver.quit() method

    try {Runtime.getRuntime().exec(System.getProperty("user.dir") + "//");} catch (IOException e) { System.out.println("Unable to close the Firefox pop up");

Hope this helps.

Upvotes: 0

sagar
sagar

Reputation: 564

I have the similar issue on Windows 10, driver.close() doesn't work and driver.quit() throws exception.

The issue is with the latest geckodriver (version 0.14), check these open issues

Upvotes: 0

Related Questions