Arunsomu Posted December 29, 2010 Share Posted December 29, 2010 Hi guys I am automating the application in both IE and firefox. The application has HTTP authentication dialog where I completely automated this for IE and I got success on that.Please view the script which I used in IE. #include <IE.au3> $o_Addy = "http://myurl.com/" $Title = "Connect to myurl.com" $username = "john" $password = "smith" _IENavigate("", $o_Addy, 0) AutoItSetOption("WinTitleMatchMode","2") WinWait($Title) $title = WinGetTitle($Title) ; retrives whole window title ControlSend($title,"","Edit2",$username);Sets User Name ControlSend($title,"","Edit3",$password) ControlClick($title,"","OK") I have to repeat the same for Firefox. When I used AutoIT window info I am able to see only the title as "Authentication Required" and class as "Mozilla Dialog class". I do not see control ids for username, password and Ok button. How can I automate this authentication dialog in firefox. Can anyone please give your suggestions on this? Link to comment Share on other sites More sharing options...
somdcomputerguy Posted December 29, 2010 Share Posted December 29, 2010 This Firefox UDF may be helpful here, - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
KaFu Posted December 29, 2010 Share Posted December 29, 2010 Yep, that UDF is the way to go . Additionally FF allows adding username and password to the URL, something like http://USERNAME:PASSWORD@www.website.com/protected_dir/ ,but then a confirmation dialog pops-up (should be easy to catch). OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Arunsomu Posted December 30, 2010 Author Share Posted December 30, 2010 Thanks kaFu and Comd for your replies. Can you please give me more details on this. I am unable to use http://username:password@www.website.com since my password contains numbers, special characters so it is not recognized. I would like to know can I use any simple autoIT script to automate this? Please refer the attached screenshot where I can get only title and window information about the authentication window. Title : Authentication Required Class : MozillaDialogClass I do not have any controls available for username , password and ok buttons. Please give your suggestions to resolve this. Link to comment Share on other sites More sharing options...
IonutEmilianMoldovan Posted August 13, 2013 Share Posted August 13, 2013 hello , did you find any solutions for the 'Authentication required' window with AutoIt ? I have the same Issue as in you're screenshot . Question : What programming language do you use Java ? cause I see the #include <IE.au3> command ? is there a framework that you can include with you're Junit Test using java , I have dealed with an authentification and solved by execution of a java process which contains the Exe. of an AutoIt script. Best regards, Ionut Emilian Moldovan. :bye: Link to comment Share on other sites More sharing options...
IonutEmilianMoldovan Posted August 13, 2013 Share Posted August 13, 2013 (edited) This is how I did it , finally , and it work perfectly for me: 1) Step 1 - creating a autoIt Script (au3) , with the below code ( where userid and password is you're authentication details, change that ) WinWaitActive("Authentication Required","","10")WinFlash("Authentication Required", "",4,500) If WinExists("Authentication Required") Then Send("userid{TAB}") Send("password{Enter}") EndIf 2) Step 2 - convert the (au3) script into an EXE with 'Compile Script' tool from AutoIt 3) Step 3 - when the authentication window appears , execute the 'EXE' file , ( I did it within a java process ) Hope it works for you also , more details are provided here : http://automationtestingsimplified.wordpress.com/2011/08/11/how-to-handle-window-based-pop-up-using-selenium-and-autoit/ NOTE:It's only for FF (because on the other browser it has another TITLE )<snip>For more info , please feel free to contact me Edited September 30, 2013 by Melba23 Removed upload link as it has not been uploaded Best regards, Ionut Emilian Moldovan. :bye: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now