| || |
Browser authetication pop-up- how do we handel?
whenever i launch application using selenium -webdriver on FF/IE/Chrome, i get authetication pop up(as shown in attached screenshot).
Unless i cancel or provide crednetials to this pop-up, no further action would happen.
So can someone suggest how do we handel such pop-up during application start up.
(also note these pop-ups do not appear all the time. they are intemittent)
I tried with windowhanderls or switchto().alerts() however control is not passed to authetication pop-up
I don't think selenium can handle this particular part. You can try below things:
1. Use an external API to handle something like this
2. Use Wscript. Just did soome googling and got
Runtime.getRuntime().exec("wscript C:\\ppt\\test1.vbs ");
Hope it gives you some direction.
Try the one described here, http://www.360logica.com/blog/2014/0...webdriver.html
Originally Posted by pandeche
Hi All, Thanks all for your help!!
I wan to share how did i resolve this issue.
I had used AutoIT as an external utility to handel these pop-ups.
E.g To handel FF authetication pop-ups, i wrote below AutoIT script. You can compile the autoit script( .au3) which coverts it into autoit.exe file. Now you can run that in background.
This will make sure whenever there is FF pop-up , it will cancel it.
WinWaitActive('[CLASS:MozillaDialogClass]', "", 10)
If WinExists("Authentication Required") Then
I thought that you can just look for list of windows and simply find the authentication and pass it. I think the other way I got around was just passing the authentication information in the header and generating a session id.