<script>
document.cookie='_srn=;expires=Thu, 01 Jan 0000 00:00:00 GMT;';
</script>
<script>
var strWindowId = "3pfb5VLw8QBMYH8eEuW2DFosHws0sm6e8da7mBeEXqsb";
</script>
<script language="javascript">
navigator.id = "1433841867";</script>
<script language="javascript">
top._swescript = window;
</script>
<script language="javascript" src="23016/scripts/rtcEditor.js"></script>
<script language="javascript" src="23016/scripts/swecommon_top.js"></script>
<script language="javascript" src="23016/scripts/swecommon.js"></script>
<script language="javascript" src="23016/scripts/navctrl.js"></script>
<script language="javascript" src="23016/scripts/sweutil_keyboard.js"></script>
</head>
<frameset rows="100%,*" border="0" frameborder="No" onunload="SWEUnloadApp("/esales_enu/start.swe","","3pfb5VLw8QBMYH8eEuW2DFosHws0sm6e8da7mBeEXqsb")">
<frame name="_sweclient" title="" src="/esales_enu/start.swe?SWECmd=GetCachedFrame&SWEACn=20956&SWEC=1&SWEFrame=top._sweclient&SRN=3pfb5VLw8QBMYH8eEuW2DFosHws0sm6e8da7mBeEXqsb" marginheight="0" marginwidth="0" noresize="" scrolling="No" cd_frame_id_="295be8d5723232bd8677e4a4e252aa46">
<frame name="_swe" title="" src="/esales_enu/start.swe?SWECmd=GetCachedFrame&SWEACn=20956&SWEC=1&SWEFrame=top._swe&SRN=3pfb5VLw8QBMYH8eEuW2DFosHws0sm6e8da7mBeEXqsb" marginheight="0" marginwidth="0" noresize="" scrolling="No" tabindex="-1">
</frameset>
</html>
这实际上是我在HTML源代码中这是不可取的,因为.i想要点击下面的属性,但同样我没有进入上面的HTML源代码。当我手动检查元素时,我会得到以下属性但是当我运行我的脚本时相同。我没有找到元素异常并且没有找到框架异常
<input type="text" name="s_1_1_102_0" value="" style="width:132" id="s_1_1_102_0" tabindex="2997" maxlength="255">
如果我上面的评论不够,请帮我解决这个问题。请问我详细了解
答案 0 :(得分:0)
当时元素可能没有加载。尝试对代码实施等待。很好的详细信息可以在这里找到 - http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp
答案 1 :(得分:0)
如果是同步问题,您可以尝试以下代码:
WebDriverWait wait = new WebDriverWait(driver, 50);
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("iFrame")));