TestProject Forum

Running Chrome against website using self-signed certificate

I am trying to run existing tests via the WebUI against a website that uses a self-signed certificate.
I am stuck with the “NET::ERR_CERT_AUTHORITY_INVALID” warning and an “Advanced” option to “Proceed to website” (adding an exception).

How can I automate this part? I thought I could use sth like in the job’s driver capabilities definition:

"acceptSslCerts": "true"
"acceptInsecureCerts": "true"

but this didn’t work yet.

Hello @stefanos.petrakis,

Can you try adding this to your custom capabilities:
“goog:chromeOptions”: {
“args”: ["–ignore-untrusted-certificate"]
}

image

Hey Artem,

Thanks! I tried this, but I still need to manually intervene and click on the “Proceed to website” to add the exception.
Any other ideas?

Cheers

Hello @stefanos.petrakis
You ran the Job and that popup still came even tho you added those capabilities?
This exception will still come up in Recording, the idea is to bypass it in execution.

Hello Ran,

Good point, but no, I didn’t try this neither in the Recording session nor from the Tests’ list.
This came up when running a Job, where I can set up the browser’s capabilities, yes.

Cheers,
Stefanos

Hello @stefanos.petrakis,

Can you try adding those capabilities :

{
“browserName”: “chrome”,
“goog:chromeOptions”: {
“args”: [
“–ignore-ssl-errors=yes”,
“–ignore-certificate-errors”
]
}
}

Hi Artem,

Thanks for holding on to this, I have almost given up.
I tried the settings, but still got the same error.

Best and many thanks,
Stefanos

Hello @stefanos.petrakis,

Can you send me the link to that site so I can try on my end?

Any update on this thread. Our team is also facing the same issue.

Wanted to post an update that I was successfully able to run my tests just using
{
“browserName”: “chrome”,
“version”: 83,
“goog:chromeOptions”: {
“args”: [
“-ignore-certificate-errors”
]
}
}

1 Like

@artem.kuznetsov How should I manage self-signed certificate while running testcases in the form of YAML file on chrome with TestProject CLI ??

@ssgupta0912

Currently, it is not supported.
We will consider adding this in the future.
There is an improvement task open for this - #14816

1 Like