2017-08-29 50 views
0

我想選擇單選按鈕,並在selectCls選擇的價值,但面臨的問題與我的代碼,請幫我提前同一VBA代碼在IE

由於選擇單選按鈕..

我的VBA代碼是:

Browser.document.getElementById("ddlCycleID").SelectCls = "Cycle 274 (21 Jun 2017 - 31 Jul 2017)" 
    Browser.document.getElementById("chkproc").Checked = True 
    Browser.document.getElementById("btnSubmit").Click 

和HTML源代碼是:

<td> 
<input value="chkproc" name="Module" type="radio" id="chkproc" checked="checked" tabindex="1" onclick="toggle(this)"> Processing Module 
<td> 


<td> 
<input value="chkquery" name="Module" type="radio" id="chkquery" tabindex="2" onclick="toggle(this)"> Other Modules 
<td> 


<td> 
<select name="ddlCycleID" id="ddlCycleID" tabindex="4" class="SelectCls" style="width:180px;"> 
<option value="Select Cycle">Select Cycle</option> 
<option value="274">Cycle 274 (21 Jun 2017 - 31 Jul 2017)</option> 
<option value="273">Cycle 273 (29 Jun 2017 - 29 Jun 2017)</option> 


</select> 
<td> 
+0

請解釋一下你有什麼問題 - 是具體的。如果您發現錯誤,那麼它們是什麼以及它們出現在哪裏? 。 –

+0

運行時錯誤 '424' 對象所需 – devendra

+0

Browser.document.getElementById( 「ddlCycleID」)SelectCls = 「循環274(2017年6月21日 - 2017年7月31日)」 表示本 「=」」當我把光標在這個代碼上 – devendra

回答

0

得到下面誤碼M SG

運行時錯誤 '424'

對象在此代碼需要

Browser.document.getElementById("ddlCycleID").SelectCls = "Cycle 274 (21 Jun 2017 - 31 Jul 2017)" 

showing this "="" when i place cursor on this code