2014-09-22 116 views
1

在Firefox中,我已將代理設置設置爲「無代理」。但是,當我通過Jenkins遠程啓動它時,它始終設置爲「使用系統代理設置」,而不是加載期望的頁面。它給'代理服務器拒絕連接'。當我試圖通過Jenkins從遠程機器執行selenium webdriver腳本時,發生了這種情況。我還沒有在硒腳本中定義過任何Firefox配置文件。從遠程啓動時,Firefox代理設置保持不變

回答

1
After spending a day on this issue I found that just proxy setting might not work. 
It is required update the default proxy type manually in below location. 

    Steps 
    go to 'C:\Program Files (x86)\Mozilla Firefox\defaults\pref' 
    and need to add a entry to 'channel-prefs.js' as below. 

    pref("network.proxy.type", 0); 

    0 = No proxy; 
    1 = Manual proxy configuration; 
    2 = Proxy auto-configuration (PAC); 
    4 = Auto-detect proxy settings. 
+0

爲我工作... – Esty 2016-03-21 11:54:52

0

我把這個放到我的mozilla.cfg文件中,它解決了這個問題。

pref("network.proxy.type", 4); 
0

我的電腦不讓我改變默認設置,所以我刪除了文件並重新啓動了Firefox。問題結束!

相關問題