-1

Here I will be entering my username

Usernamepage

Next I will enter my password PasswordPage

After the Click on “Sign on” , user will be directed to page which user would have given either two types of Authenication either through OTP (which is send to registered phone) or Approve or dismiss notification to registered phone.

Micrsoft Authenication

My question is how can we automate the last step because every time I don't want to log in to the phone to approve or enter the OTP. How can we automate it through Selenium with Java?

Please free to suggest any methods/ways we can automate this. Appreciate your inputs. Thank You.

Thanks in advance.

Microsoft Authenicator

Chan Sri
  • 7
  • 2
  • 1
    Unfortunately we do not have enough information to help you. Please [edit] your question to include a [repro]. – Greg Burghardt Apr 23 '21 at 16:11
  • @GregBurghardt Please check. I have updated. – Chan Sri Apr 23 '21 at 16:30
  • 1
    Screenshots are good, but we need to see your code trials. What code did you try? The expectation at StackOverflow is that you try things out first. We are not a code writing service. – Greg Burghardt Apr 23 '21 at 16:31
  • Are you logged into your work network when running this? If so you shouldn't get that authentication step, or it should authenticate you automatically after your password is entered. At least it works that way where I am. It's only when I try to log in when off-network that I need to authenticate. – JD2775 Apr 23 '21 at 16:56
  • @JD2775 Yeah. My application flow actually starts after the Authentication is done from my phone. Since in my test environment. we need to follow these steps. So if we can automate the OTP in some way. it can help me. – Chan Sri Apr 23 '21 at 17:06

1 Answers1

0

In general, first step should be to try to disable that second authentication step in the test environment(From the application/dev side)and automation it.

If it is impossible to disable it, you can explore Twilio Service/Api. Twilio is a platform for creating SMS messages, calls, and other communications using which you can handle OTP scenario.