2014-10-29 36 views
0

我正在寫一個Java應用程序,我正在做一個簡單的driver.get(url)其中URL將提示您選擇一個證書。我想嘗試使用AutoIt jar來自動化Firefox 33中的證書選擇過程,但是我執行這個get後甚至無法繼續執行我的Java程序,因爲該站點處於無限期加載狀態,直到證書因此執行無限期停留在get本身。有沒有辦法解決?Selenium Webdriver繼續從站點獲取()後提交證書

回答

0

我發現了一個類似的問題:在上面的鏈接給出Make Selenium Webdriver Stop Loading the page if the desired element is already loaded?

THS的解決辦法是改變Firefox設置的情況下,該網頁正在載入時間太長。

FirefoxBinary firefox = new FirefoxBinary(new File("/path/to/firefox.exe")); 
FirefoxProfile customProfile = new FirefoxProfile(); 
customProfile.setPreference("network.http.connection-timeout", 10); 
customProfile.setPreference("network.http.connection-retry-timeout", 10); 
driver = new FirefoxDriver(firefox, customProfile); 
相關問題