2015-06-09 13 views
-4
<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(&quot;/esales_enu/start.swe&quot;,&quot;&quot;,&quot;3pfb5VLw8QBMYH8eEuW2DFosHws0sm6e8da7mBeEXqsb&quot;)"> 
     <frame name="_sweclient" title="" src="/esales_enu/start.swe?SWECmd=GetCachedFrame&amp;SWEACn=20956&amp;SWEC=1&amp;SWEFrame=top._sweclient&amp;SRN=3pfb5VLw8QBMYH8eEuW2DFosHws0sm6e8da7mBeEXqsb" marginheight="0" marginwidth="0" noresize="" scrolling="No" cd_frame_id_="295be8d5723232bd8677e4a4e252aa46"> 
     <frame name="_swe" title="" src="/esales_enu/start.swe?SWECmd=GetCachedFrame&amp;SWEACn=20956&amp;SWEC=1&amp;SWEFrame=top._swe&amp;SRN=3pfb5VLw8QBMYH8eEuW2DFosHws0sm6e8da7mBeEXqsb" marginheight="0" marginwidth="0" noresize="" scrolling="No" tabindex="-1"> 
    </frameset> 
</html> 

這是實際我在HTML源代碼,這是不希望,因爲希望。我點擊下面的屬性,但是同樣讓我來選擇確切元素我沒有進入上面的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

我不能完全按照你的問題,你可以嘗試編輯解釋什麼是你的代碼應該做什麼,錯誤結果是什麼?理想情況下將完整的錯誤信息粘貼到您的問題中。 – SuperBiasedMan

+0

你也可以發佈有問題的網站的網址? –

回答

0

如果它是一個同步的問題,你可以試試下面的代碼:

WebDriverWait wait = new WebDriverWait(driver, 50); 
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("iFrame")));