1

当我尝试在 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">**

任何帮助将不胜感激。

4

0 回答 0