Selenium Web驱动程序 - 无法连接到localhost-获取超时异常

时间:2013-03-15 14:16:54

标签: c# visual-studio-2010 selenium-webdriver

当我尝试在Selenium C#WebDriver中执行此行时,我收到此错误。

selObj.Driver.SwitchTo().Frame("iframe");

我在执行上面一行后立即收到超时异常。它说

  

“无法连接删除服务器”localhost \ selenium \ 5661 \ element“   发生超时异常“

这是我试图解析的html源代码:

**<iframe id="ReportFramectl00_PB_Viewer" frameborder="0" style="width:100%;height:100%;border-top:1px DarkGray Solid;display:inline;" name="ReportFramectl00_PB_Viewer" src="/prada/Reserved.ReportViewerWebControl.axd?OpType=DocMapReport&ClientController=ctl00_PB_Viewer&ReportUrl=%2fprada%2fReserved.ReportViewerWebControl.axd%3fReportSession%3doidzr5nkulkcjh55wp0mvhbc%26ControlID%3d43794585cd934abfbde38a7779bdeaa3%26Culture%3d1033%26UICulture%3d1033%26ReportStack%3d1%26OpType%3dReportArea%26Controller%3dctl00_PB_Viewer%26PageNumber%3d1%26ZoomMode%3dPercent%26ZoomPct%3d100%26ReloadDocMap%3dtrue%26SearchStartPage%3d0%26LinkTarget%3d_top">
<frameset id="frameset" frameborder="1" framespacing="0" cols="0,*">
<frame id="docmap" frameborder="0" name="docmap" src="javascript:''">
</frame>
<frame id="report" onload="parent.document.getElementById('ctl00_PB_Viewer').ClientController.OnReportFrameLoaded();" noresize="true" frameborder="0" name="report" src="/prada/Reserved.ReportViewerWebControl.axd?ReportSession=oidzr5nkulkcjh55wp0mvhbc&ControlID=43794585cd934abfbde38a7779bdeaa3&Culture=1033&UICulture=1033&ReportStack=1&OpType=ReportArea&Controller=ctl00_PB_Viewer&PageNumber=1&ZoomMode=Percent&ZoomPct=100&ReloadDocMap=true&SearchStartPage=0&LinkTarget=_top">**

非常感谢任何帮助。

0 个答案:

没有答案