We have a UI page that uses Okta multifactor authentication (MFA). We are trying to automate our testing process using Selenium. However, since the Okta authentication code is only available on a mobile device, it is breaking our automated testing workflow.
I am looking for alternative ways to automate the login process, such as generating the Okta authentication token using an API and passing the value to the UI. I am open to any other options or best practices that might be available for this scenario.
Additionally, I want to know: Is there a way to skip multifactor authentication or use a static code to complete the Okta authentication process for automated testing purposes?
For the users that are used for your testing, what about creating an authentication policy rule specifically for these users (say, by putting them all in a specific group) that does not require MFA?
So if you have a specific application that is being run through your tests, you will want to identify the Authentication Policy assigned to that application and then create a new Rule (you may want to make sure its moved to the top of the list) and specify in it that the rule will apply if “User’s group membership includes” the group in question.