http://qs1969.pair.com?node_id=974010

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

Hi All, I am having problems accessing to a popup to fill in a form. I click link and then the script just hangs. It is not until I manually click cancel until the script tries next lines of code. I have tried the method for handling popups from this monk page http://www.perlmonks.org/?node_id=720018 but it does not get the popup. But that I believe is caused by the script hanging after clicking the link and the JS popup launches.

Link code "javascript:openMdlWindow('InvestmentDetailOptions.aspx?IDAssetType=', +'620','600');if(window.document.RetValue == '2'){window.parent.Loadin +Iframe('InvestmentDetail.aspx?FromMenu=N&IDAssetType=','Investmen +t Details > Full View','false');}" My Code $sel->click("link=Filter"); $sel->select_target_blank_window(30000); $sel->get_eval("window.document.aspnetForm.ctl00_ContentPlaceHolder2_s +electDay.value =".$pday); $sel->get_eval("window.document.aspnetForm.ctl00_ContentPlaceHolder2_s +electMonth.value =".$mnth); $sel->click("ctl00_ContentPlaceHolder2_btnSubmit2");

Any suggestion or thoughts? has anyone seen this issue before. Thank you in advance. <\p>

Replies are listed 'Best First'.
Re: Java POPUP handling with Selenium
by Anonymous Monk on May 07, 2013 at 20:40 UTC
    See, if this helps. Robotil is a simple library to press/release keyboard keys on remote machine, it is helpful to handle popup using keyboard short-cut keys. Download Link - http://www.codoid.com/products/view/2/27