同一个站点有两个实例,唯一的区别是,一个使用有效的,另一个使用无效的HTTPS/SSL 认证
。我尝试在 headless ChromeDriver 2.31
中打开两者,发现它只打开具有有效 SSL
认证的站点。
<chromepath> --headless --remote-debugging-port=9101 --disable-gpu <siteurl>
上面的代码打开一个站点 https://chrome-devtools-frontend.appspot.com/serve_file/identification_number从给定的网站预览。
我用它来忽略证书问题,但我在 ChromeDriver
中得到了这个网站的相同空白页。
caps.setCapability("chrome.switches", Arrays.asList("--ignore-certificate-errors"));
最佳答案
聚会迟到了,也许对某人有用,以下参数对我有用。
acceptInsecureCerts: true
关于ssl - ChromeDriver 仅打开具有有效 SSL 证书的网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46036298/