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>


In reply to Java POPUP handling with Selenium by mmittiga17

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.