How to handle Authentication Required popup using AutoIT?
While browsing some websites, Authentication required popup comes asking username and password. Observe below snap.
Now, this can be handled using either robot class or by using AutoIT script.
Let us see how this Authentication Required popup is handled using AutoIT script.
Script used to handle this Authentication popup is as below –
WinWaitActive(“Authentication Required”,””,”10″)
If WinExists(“Authentication Required”) Then
Send(“username{TAB}”)
Send(“Password{Enter}”)
EndIf
Add this script in SciTE editor. Save the file with some name by .au3 extension.
Now compile the script by right clicking on it, with respective version.
Once compilation is successful, .exe file will be created with same name.
Now, we can use this .exe file & run this via our selenium Webdriver script.
Runtime.getRuntime().exec(“C:/Users/Prakash/Desktop/TestScript.exe”);
That’s, all, this is how we can handle Authentication Required Popup using AutoIT