Jump to content

Problem with firefox Alertbox


 Share

Recommended Posts

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..

post-51475-12474910550547_thumb.jpg

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...