Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium testing : How to bypass okta in selenium

We have recently implemented okta into our application.

Whenever the user wants to login it will ask for an okta code which will keep on changing every 30 seconds, but while running selenium how should I enter the okta code?

Can I bypass okta for selenium Automation? Or what should I do ?

Ideas and solutions are appreciated.

Thanks in advance.

like image 269
Ravikiran Jakkannavar Avatar asked Jul 26 '18 11:07

Ravikiran Jakkannavar


People also ask

How do I bypass basic authentication in Selenium?

Pass username and password in the URL For example, if you have basic authentication enabled in the www.example.com/index.html page then by passing username and password in the URL (refer the below code), you can avoid the login prompt and get authenticated automatically.

How do I bypass I am not a robot in Selenium?

By adding a hook to the code, users can bypass the Captcha while performing Automation Testing. The Captcha recognizes a bot clicking the checkbox element by the fact that it takes less time for the bot to click as compared to humans.


1 Answers

  • Direct by pass is not supported by selenium right now.
  • One solution for this scenarios is to create a dedicated test credential and bypass MFA for this credential in Okta configuration.

You can whitelist the test account to not be prompted for MFA under - Admin >> Security >> Authentication >> Sign On

Reference - https://devforum.okta.com/t/method-to-bypass-multi-factor-athuntication/4669

like image 116
virulent-slash Avatar answered Sep 24 '22 00:09

virulent-slash