ckj has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am trying to get content of site http://www.realtor.com/, but first time whenever we open this link it consist of a pop-up window, I tried mechanise::firefox to close it but it's not working. Can someone help me out in this?
  • Comment on can someone tell me how can i close a pop-up window using mechanize

Replies are listed 'Best First'.
Re: can someone tell me how can i close a pop-up window using mechanize
by marto (Cardinal) on Apr 11, 2012 at 08:51 UTC
Re: can someone tell me how can i close a pop-up window using mechanize
by Corion (Patriarch) on Apr 11, 2012 at 17:57 UTC
    What is this module "mechanise::firefox" and what capabilities does it offer to close windows? Maybe you meant "WWW::Mechanize::Firefox, but I'm unaware of any documented function in it that closes windows. What part of the documentatfion leads you to believe that there is such a functionality and what code did you try to use it?

    Update: It has been pointed out that the "window" is a modal page element. Then using the ->click method or whatever other user interaction that modal page elment affords could be used.

Re: can someone tell me how can i close a pop-up window using mechanize
by blakew (Monk) on Apr 11, 2012 at 17:50 UTC
    If you're automating Firefox then disable popups in Firefox.