-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
latest
Node.js Version
18.16.0
Mode
WDIO Testrunner
Which capabilities are you using?
[
{
"browserName": "chrome"
},
{
"browserName": "firefox"
}
]What happened?
Specifying the capability acceptInsecureCerts to true does not enable the browsers to ignore self-signed certificates (often user with local web development servers).
Testing against local web development servers often require automation to ignore self-signed certificates. There is a W3C spec capability (acceptInsecureCerts) that allows us to proceed in these cases. However the automation protocol devtools was not respecting this capability and passing the need flags to the browser launcher routines.
We already have the devtools option ignoreHTTPSErrors that can be defined in the wdio:devtoolsOptions capability. This seems to only have effect for Firefox.
For Webkit/Blink based browsers, it is necessary to pass the (chrome)flag --ignore-certificate-errors
An example of a domain with a "bad" certificate could be found here: https://self-signed.badssl.com/
What is your expected behavior?
Enabling the capability acceptInsecureCerts to true should allow me to reach and test domains that have a self-signed certificate.
How to reproduce the bug.
with config:
{
automationProtocol: 'devtools',
capabilities: [
{
"browserName": "chrome",
"acceptInsecureCerts": true
},
{
"browserName": "firefox",
"acceptInsecureCerts": true
}
]
}try to reach and assert something in a web page with a self-signed certificate:
await browser.url('https://self-signed.badssl.com/')Relevant log output
N\ACode of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues