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

2 Likes

Does this task got merged ?? Is it possible to manage self-signed certificate with YAML file ( testproject CLI ) ??

@ssgupta0912

Sorry, but this has not yet been implemented.
We will inform you when it will.

2 Likes

Okay… no problem. Thanks for replying. :+1:

Hi! I’m new to TestProject so I’d like to ask: where exactly can I set the Desired Capabilities - those in the example where I could ignore an unstrusted certificate? I tried searching the help and forum, but couldn’t find an answer to where they are set.

Thanks

Hi @Wilho,
You can put the Desired Capabilities by clicking the Job capabilities button

chrome_sJZA8JRMql

Kind regards
Tal

Hello , I am having a problem with bypassing untrusted certs.
I tried this
{
“browserName”: “chrome”,
“version”: 89,
“proxy”: {
“autodetect”: false,
“httpProxy”: “localhost:8080”,
“sslProxy”: “localhost:8080”,
“proxyType”: “manual”
},
“goog:chromeOptions”: {
“args”: [
“–ignore-certificate-errors”,
“–start-maximized”,
“–disable-notifications”,
“–allow-running-insecure-content”,
“–disable-web-security”,
“–disable-gpu”,
“–ignore-ssl-errors=yes”,
“–ignore-untrusted-certificate”
]
}
}

but the output is still likes this in chrome:

The information you’re about to submit is not secure

Because this form is being submitted using a connection that’s not secure, your information will be visible to others.

Please advise…

I have tried all the above arguments and ran them but the website doesn’t force proceed to the home page. Instead, it stays at the not secure page while the automation is being performed. please provide any suggestions to bypass the not secure page issue.

This works for me on a Job level: you have a Job and you set your Driver Desired Capabilities from the icon (see picture)
image

I have the following options and it successfully skips certificate errors when I run the Job. Obviously if I run the test separately (and not inside the Job), the test without the options will have the certificate warning window.

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

I don’t know if this helps, but it worked for me! Also in my example, I use the application website, I’m not using OpenSDK in this case.