When using Chrome 62, Chrome Driver 2.33, and WebDriver 3.6.0, I have noticed that Chrome allows pages to load with bad SSL certificates. Even though the URL bar displays "Not Secure," the page still loads without any issues. Strangely, if I navigate to the same page manually, I encounter the expected 'blocker page' warning.
My goal is to have Chrome reject these insecure pages when accessed through WebDriver, just like it does for human users.
Surprisingly, I haven't come across anyone else experiencing this particular issue. Most reports I found were about users wanting to allow insecure connections via WebDriver but being blocked by Chrome instead.
Is there a specific flag that needs to be set or prevented from being set in order to address this problem internally?
const {Builder, Capabilities} = require('selenium-webdriver');
const driver = new Builder()
.withCapabilities(Capabilities.chrome())
.build();
driver.get('https://localhost/'); // Using self-signed certificate.