gsb678 Posted September 21, 2007 Share Posted September 21, 2007 Hi All I'm new to autoIt and facing problem in resolving following issue. After loading the URL in browser, Entered Username and password. Then clicked on submit button. Now it is displaying Security Alert that saying that " You are about to be redirected to a connection that is not secure. Do you want to proceed" with Yes and No buttons. When tried with functions like WinWaitActive("Security Alert","&Yes") and send("!Y") or ControlClick or MouseClick, not clicking the Yes button. By the way the URL loaded is redirecting to a login page over https. Can any one give me any idea hwo to handle such type of Alerts using AutoIT. Thanks in advance. Link to comment Share on other sites More sharing options...
frostfel Posted September 22, 2007 Share Posted September 22, 2007 Hi AllI'm new to autoIt and facing problem in resolving following issue.After loading the URL in browser, Entered Username and password. Then clicked on submit button.Now it is displaying Security Alert that saying that " You are about to be redirected to a connection that is not secure. Do you want to proceed" with Yes and No buttons.When tried with functions like WinWaitActive("Security Alert","&Yes") and send("!Y") or ControlClick or MouseClick, not clicking the Yes button.By the way the URL loaded is redirecting to a login page over https.Can any one give me any idea hwo to handle such type of Alerts using AutoIT.Thanks in advance.What this does is gets a list of all windows and gets how many windows there are then checks each name and if it finds a window "Security Information" then it will send a control click to the yes now because you siad your getting a window titled "Security Alert" you have to change line "If $WinList[$WinNum][0] = "Security Information" Then" to "If $WinList[$WinNum][0] = "Security Alert" Then" also ControlClick("Security Information", "", 6, "Left" ) to ControlClick("Security Alert", "", 6, "Left" )and use the AutoIt Window info to the control ID of Yes to do that load the win info put ur mouse over Yes on sercurty thing and press Ctrl+Alt+F and get the control ID and change line ControlClick("Security Information", "", 6, "Left" ) and replace the 6 with the control ID and when you call that func in ur program will find and close that window (In the sricpt below you can press Delete key to test it)Func Start() $WinNum = 0 $WinList = WinList() $WinTotal = $WinList[$WinNum][0] While 1 If $WinList[$WinNum][0] = "Security Information" Then ControlClick("Security Information", "", 6, "Left" ) ExitLoop Else $WinNum += 1 EndIf If $WinNum = $WinTotal Then ExitLoop EndIf WEnd EndFunc Func ExitApp() Exit EndFunc HotKeySet("{DEL}", "Start") HotKeySet("{INS}", "ExitApp") 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