ikaros Posted July 12, 2010 Share Posted July 12, 2010 Hi all,For some time now i am facing a new battle around the IE automation scripts.Whenever a user tries to connect his/her cpanel, they get a windows IE security pop-up, waiting for user and password.This mainly happen to untrusted domains.I decided to solve this by the next code : $cpanelBrowser = _IECreate("http://www.somesite.com/cpanel",0,1,0)Notice that i donut want the script to wait for the web page to load, and this is for the simple reason, that the pop-up is not a part of the web pageand stands on its own thread.WinWaitActive("Connect to") WinActivate("Connect to")I look for the window with the "Connect to" title and activate it, making it the active (focused) window.ControlClick("Connect to", "", "[CLASS:Button; INSTANCE:3]")I press the 3rs index button, in this case is the "Cancel" button. The IE will redirect me to a login page, a simple webpage with connection form, and from this point you are home free with simple _IEGetObjByName and _IEFormSubmit...Just wanted to share this, i looked for a simple solution, but all saying the same (Something like " It is harder than it is..."). Ofer,WWW Home baseArticles for allOnline statistics toolThe online mass mailerWorld of bicycles 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