Gaurang Posted July 13, 2009 Share Posted July 13, 2009 hi folks,I am using selenium to automate my application.However it is not able to handle the alertbox which pops up at page load event. So I am using autoit to click on that alertbox. I have write down the following script for that.AutoItSetOption("WinTitleMatchMode","2") WinWait($CmdLine[1]) $title = WinGetTitle($CmdLine[1]) ; retrives whole window title MsgBox(0,"",$title); shows the actual title MsgBox(0,"",WinExists($title)); return 0 MsgBox(0,"",WinKill($title)); return 0 Send("{ENTER}") While WinExists($title) WinActivate($title) Send("{ENTER}") WEnd MsgBox(0,"","DONE !");Above script successfully shows the title of the window however then after other command on that fails. Please let me know what the hell i am doing wrong here.. Link to comment Share on other sites More sharing options...
Gaurang Posted July 13, 2009 Author Share Posted July 13, 2009 hi guys, don't know but somehow not able to edit the post so write reply..The important thing is that problem occurs only if firefox is opened through selenium only. if I open the firefox manually it works fine. 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