2016-01-29 35 views
0

當我運行(driver.quit),它會打開Firefox瀏覽器並退出其作爲預期,但錯誤是作爲「Unable to find executable for: taskkill"
我設置的環境。變量PATH爲 「C:\ Windows \ System32下」,並運行測試,但我仍然收到此錯誤硒網絡驅動器異常「無法找到可執行文件:TASKKILL」

我使用硒java的2.48.2.jar和Firefox 42.0

public void closeBrowser(){ 
     try{    
      driver.quit();   
     } 
     catch(Exception ex){ 
      System.out.println(ex.getMessage()); 
     } 
    } 
+0

嘗試降級你的Firefox可能會工作, –

+0

你設置路徑後重新啓動IDE嗎? –

+1

在硒更改日誌中,您會發現最新的支持僅可用於FF41.0.2 –

回答

0

我。建議使用driver.close()而不是driver.quit()。要了解它們之間的差異,請參閱question

相關問題