1
votes

Hi All I am having problems accessing a form with in a popup window that is opened after I click on a link. I appears once I have clicked the link it causes the script to hang and will not even time out. I need to be able to access the form, set some text fields and the click the submit button.

Link code: <a id="ctl00_ContentPlaceHolder2_ctrlPageHeader1_aFilter" class="RightTextHeading" onclick="javascript:openMdlWindow('InvestmentDetailOptions.aspx?IDAssetType=','620','600');if(window.document.RetValue == '2'){window.parent.LoadinIframe('InvestmentDetail.aspx?FromMenu=N&amp;IDAssetType=','Investment Details &gt; Full View','false');}" style="text-decoration:none;">Filter</a>

I have tried everything but nothing seems to work. Has anyone ever came across this before and have a solution?

Thanks

1

1 Answers

0
votes

Did you try this:

browser.window(:title => "annoying popup").use do
  browser.button(:id => "close").click
end

More information: http://watirwebdriver.com/browser-popups/