K
K
kykyryky2016-11-23 11:13:57
Google Chrome
kykyryky, 2016-11-23 11:13:57

How to fix ssl error in chromedriver?

There is a program that enters data into a web form through chromedriver, clicks on a button, after which a new page is loaded with results that are also read through chromedriver. But on about 2 computers out of 10, when loading the results page, an error appears:
97518dd7be8748d196ed77963dfa4b11.jpg
What could be the reason? On stackoverflow, similar questions hang unanswered ( 1 and 2 ).
I create an instance of the driver like this:

var options = new ChromeOptions();
var userName = Environment.UserName;
options.AddArguments("--user-data-dir=C:\\Users\\" + userName + "\\AppData\\Local\\Google\\Chrome\\User Data");
webDriver = new ChromeDriver(options);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Sundukov, 2016-11-23
@alekciy

Possible reasons 2. The browser could not agree with the server about the applied schemes and the handshake fails. Most likely, the server we are accessing is quite new, and the browser is quite old. Quickly solved by updating the browser.
The second option is a self-signed certificate on the server. Then dig somewhere here: stackoverflow.com/questions/5933871/handling-untru...
In general, I would recommend bringing all 10 nodes to one system environment. If this is of course possible. If these are different OS / browser_versions, then it is possible that they are too old and, in principle, will not be able to agree with the server. If the server is under your control, you can play around with the SSL settings on the server itself. If not, and these 2 nodes cannot be updated, then solutions can only be crutch in the spirit of cunning proxies and dancing with tambourines. But I would think ten times before resorting to such methods.

E
Evgeniy _, 2016-11-29
@GeneD88

The same thing happens when

DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability("chrome.switches", Arrays.asList("--ignore-certificate-errors"));
?
PS: "--ignore-ssl-errors"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question