Handling Okta TLS client-certificate prompt & MFA in Katalon E2E tests

We’re automating E2E flows for an internal app protected by Okta. On first navigation to our tenant, Chrome shows a “Select a certificate” dialog for *.mtls.okta.com (mTLS client auth). This blocks our Katalon tests because the dialog is outside the page DOM.

Environment

  • Katalon Studio on macOS

  • Chrome/Edge (Chromium)

  • Okta sign-in → mTLS to ….. (company domain)

  • Certificate is issued by our corporate CA and lives in the local device keychain

What happens

  • When navigating to the app’s SSO URL, the browser displays the native client-cert picker (“Subject / Issuer / Serial”).

  • Because it’s a native sheet/dialog, Selenium/Katalon can’t click OK or choose a cert via normal WebUI keywords.
    What we’ve confirmed

    • The certificate in the dialog is fetched from the local device (keychain), not provisioned through the web page.

    • This is expected behavior for mutual TLS (mTLS) endpoints.

    • WebDriver’s “accept insecure certs” does not apply here (that flag is for server TLS trust, not client-cert selection).

      Kindly suggest/recommend any tips on

      how to handle and bypass such MFA case, as it is needed to perform as 1:1 testing procedure in the company. There are 2 ways i tried ,

    • one is with a personal account which binded with certificate from local device

  • and the second one with dedicated test account which has no ceritificate linked but it is however showing the native pop up from okta that i need to resolve within the automation running. (note: this element is not captured with the tool and popped up from the device)

2 Likes

May I bring in the experts here to take a look @Monty_Bagati @kazurayam @dineshh :star_struck:

Have you tried to use Robot, like to hit the Enter button:

import java.awt.Robot
import java.awt.event.KeyEvent

Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);

If there is more to what you need to do, then keep looking outside of Katalon forum for other sites that use Selenium and see if they offer something.

Note: You cannot use the mouse or keyboard when you are using the Robot as that is what it is trying to “use”.

please try grylion54’s suggestion of robot class which would help your case

1 Like

Thanks for your recommendation, yes i’m able to do it with Robot. Would this work for testcloud execution too? any recommendation how to trigger it on remote execution?

Start another post and put your question out there for others to review. You will have to give more information about what you mean by “how to trigger” because I’m not sure what you have going on.

2 Likes

let us know your solution on remote execution

1 Like