You can issue a selectWindow command to selenium RC server, which
accepts the Window's ID as the input and selects the window but this
is valid if the popup that you are trying to select is a browser
popup. To select the download window which is (probably) a OS window,
you will need something like Autoit.
Never really got a chance to work on Autoit, but heard its really good
for such automation.
Hope it helps.
Thanks,
Rajat Jindal
quicksilver1183-tech.blogspot.com
If you are using Selenium RC you can call AutoIt just before you
execute your Selenium command. On the Grid you will have to make
AutoIt run constantly and "listen" for those pop-ups.
Here is an example of an AutoIt script for closing the Firefox
Security Warning pop-up.
WinWaitActive("[TITLE:Security Warning; CLASS:MozillaDialogClass]","",
10)
If WinExists("[TITLE:Security Warning; CLASS:MozillaDialogClass]")
Then
WinActivate("[TITLE:Security Warning; CLASS:MozillaDialogClass]")
Send("{ENTER}")
EndIf
I just wanted to re-iterate for others out there that autoit is
probably the best solution out there right now for dealing with
downloads directly from firefox and IE. Of course downloading the
file directly from a separate library is best. But I could not just
use a python library like urllib since my download requires
authentication.
If you're using pythonRC calfdog has made some progress doing the IE
automation, but it requires 5 libraries and doesn't work on firefox.
http://groups.google.com/group/selenium-users/browse_thread/thread/74e19d813372e40/ddc8fd6a5a348687
Here's some autoit scripts for saving firefox and IE to the default
location . Make sure to delete the file if it already exists or else
you'll get the overwrite prompt. I compiled these into exes and now
run them before I attempt a download.
IE:
WinWaitActive("File Download - Security Warning","", 10)
If WinExists("File Download - Security Warning") Then
WinActivate("File Download - Security Warning")
Send("!s")
EndIf
WinWaitActive("Save As", "", 10)
Send("!s")
Firefox:
WinWaitActive("[TITLE:Opening ; CLASS:MozillaDialogClass]","", 10)
If WinExists("[TITLE:Opening ; CLASS:MozillaDialogClass]") Then
WinActivate("[TITLE:Opening ; CLASS:MozillaDialogClass]")
Send("{ENTER}")
EndIf
On Mar 23, 11:37 am, Martin <mlienha...@gmail.com> wrote:
> AutoIt will work for clicking thru those pop-up dialogs.
>
> If you are using Selenium RC you can call AutoIt just before you
> execute your Selenium command. On the Grid you will have to make
> AutoIt run constantly and "listen" for those pop-ups.
>
> Here is an example of an AutoIt script for closing theFirefox
> Security Warning pop-up.
>
> WinWaitActive("[TITLE:Security Warning; CLASS:MozillaDialogClass]","",
> 10)
> If WinExists("[TITLE:Security Warning; CLASS:MozillaDialogClass]")
> Then
> WinActivate("[TITLE:Security Warning; CLASS:MozillaDialogClass]")
> Send("{ENTER}")
> EndIf
>
> On Mar 23, 9:17 am, Rajat Jindal <rajatjinda...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > You can issue a selectWindow command to selenium RC server, which
> > accepts the Window's ID as the input and selects the window but this
> > is valid if the popup that you are trying to select is a browser
> > popup. To select thedownloadwindow which is (probably) a OS window,
> > you will need something like Autoit.
>
> > Never really got a chance to work on Autoit, but heard its really good
> > for such automation.
>
> > Hope it helps.
>
> > Thanks,
> > Rajat Jindal
> > quicksilver1183-tech.blogspot.com
>
> > On Mar 22, 4:16 pm, "Dev.." <devdar...@gmail.com> wrote:
>
> > > Hello
> > > can anyone let me know how can i handle thefirefox"Download" popup or
> > > any otherfirefoxpopup through selenium with java.