2017-06-01 6 views
0

次のコードを使用してFirefoxブラウザを起動しようとしています。org.openqa.selenium.SessionNotCreatedExceptionブラウザを起動できませんでした\? C: Program Files Mozilla Firefox firefox.exe:その他osエラー

import org.openqa.selenium.By; 
import org.openqa.selenium.WebDriver; 
import org.openqa.selenium.firefox.FirefoxDriver; 
import org.openqa.selenium.remote.DesiredCapabilities; 
import org.testng.annotations.Test; 

public class test00104 { 

    @Test 

    public void testerror15() throws InterruptedException{ 
     System.setProperty("webdriver.gecko.driver","D:\\WorkSpace_Shweta\\UIAutomation\\lib\\geckodriver.exe"); 
     //System.setProperty("webdriver.firefox.bin","C:\\Program Files\\Mozilla Firefox\\firefox.exe"); 
     WebDriver driver = new FirefoxDriver(); 
     driver.get("https://www.google.com"); 
     Thread.sleep(2000); 
     driver.findElement(By.xpath("http://www.google.com")).sendKeys("Selenium hq"); 
    } 
} 

どういうわけか、それは動作しませんし、私が手にエラーがある:

org.openqa.selenium.SessionNotCreatedException Failed to start browser \\?\C:\Program Files\Mozilla Firefox\firefox.exe: other os error.

私はポストのカップルを見ましたが、答えを見つけることができませんでした。 環境を使用:セレン3.4.0、ヤモリ0.16.0およびFF 53.0.3

答えて

0

を私はgeckodriverは錆のプロファイルディレクトリを作成することができませんでしたように、/tmpを超えることのクォータによって引き起こされた同様の問題がありました(rust_mozprofile*)があります。

環境変数TEMPを使用して、これらのプロファイルの別の場所を指定できます(https://github.com/mozilla/geckodriver/issues/299参照)。また、プロファイルがTEMPでいっぱいにならないように、driver.quit()を使用してドライバを適切にシャットダウンしてください。

関連する問題