Reputation: 149
I wrote selenuim code that open Google, send some search criteria to engine and click on specific link in result pages. Еverything is fine, but if I set proxy setting to firefox in most of cases webDriver open the google very slowly and everything stop here. WebDriver can't find the search input of google and the code stop.
here is the code for setting the proxy settings
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("network.proxy.type", 1);
profile.setPreference("network.proxy.http","some Proxy");
profile.setPreference("network.proxy.http_port", port);
driver = new FirefoxDriver(profile);
I can't understand why when I use proxy webDriver can't work properly.
Upvotes: 1
Views: 268
Reputation: 31
Google switched over to https. In order to get it to work you need to accept the SSL certs. Java should be similar but in Python just add:
profile.accept_untrusted_certs = True
profile.update_preferences()
Upvotes: 1