Handle untrusted site pop-up window

This article explains how to handle a certificate to bypass the "Untrusted site" pop-up window on browsers for both mobile devices and desktop web cradles.

iOS devices

Perfecto's suggestion is to put your certificates on a web server and write an automation script that will perform the certificate installation.

As this is not a system feature this can be done by your team with the help of Perfecto in case needed.

Android devices

Perfecto has not discovered a way to automate this on Android devices without using a passcode. However, passcode-protected devices are not supported and will not be supported any time soon. Therefore, we suggest automating the pop-up warnings shown by the browser when accessing the affected web pages.

Following is a solution to automate the pop-up window:

Because this is a system pop-up window, consider clicking using an OCR click.

Copy
Map<String, Object> params = new HashMap<>();
params.put("label", "OK");
params.put("threshold", 90);
driver.executeScript("mobile:button-text:click", params);

For more information, see Text button click (FR).

Web

For MAC: Will be added by Perfecto.

For VM: Will be added by Perfecto. For this to work, you will need to add the following capabilities.

Copy
capabilities.setCapability("customizationScript", "pm-self-signed.yml");
capabilities.setCapability("customizationScriptArgs", "{\"fileslist\": \"['certnew.p7b']\"}");