1
我試圖從以下選擇列表中選擇「浮動」選項:硒selectByVisibleText工作不正常
<select id="pt1:tabs:ruleDictEditorTab:r2:bsets_ddc:iter:0:bse_dc:bse1:dtype::content" class="x2h" title="int" name="pt1:tabs:ruleDictEditorTab:r2:bsets_ddc:iter:0:bse_dc:bse1:dtype" _afrfoc="y1404280666174">
<option value="0" title="String">String</option>
<option selected="" value="1" title="int">int</option>
<option value="2" title="double">double</option>
<option value="3" title="char">char</option>
<option value="4" title="byte">byte</option>
<option value="5" title="short">short</option>
<option value="6" title="long">long</option>
<option value="7" title="float">float</option>
<option value="8" title="Date">Date</option>
<option value="9" title="Time">Time</option>
<option value="10" title="DateTime">DateTime</option>
</select>
我的硒代碼:
Select typeSelect = new Select(driver.findElement("//select"));
typeSelect.selectByVisibleText("float");
運行時
,我看到了選擇改變'浮動'一秒鐘,但立即變回默認'int'選項。有沒有人見過這種問題?如何解決它?