[英]ruby watir-webdriver cannot access popup
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&IDAssetType=','Investment Details > Full View','false');}" style="text-decoration:none;">Filter</a>
链接代码:
<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&IDAssetType=','Investment Details > 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 谢谢
Did you try this: 您是否尝试过:
browser.window(:title => "annoying popup").use do
browser.button(:id => "close").click
end
More information: http://watirwebdriver.com/browser-popups/ 详细信息: http : //watirwebdriver.com/browser-popups/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.