0
我有一個已經預先選擇值的下拉菜單,請幫助我如何獲取所選文本值並將其打印到控制檯獲取這已經是在下拉菜單中硒的webdriver選擇的價值
下降下拉菜單HTML代碼
<select id="ctl00_ContentPlaceHolder1_ddlCalculation" class="normalText"
style="width:100%;"
onchange="javascript:LoadMethods(this.value);
CallonChange(this.value,'spn_ddlCalculation');
return false;"
disabled="disabled" name="ctl00$ContentPlaceHolder1$ddlCalculation">
<option value="0" selected="selected">--- Select ---</option>
<option value="f">Formula Based</option>
<option value="m">Formula Based with Matrix Table</option>
<option value="q">Quantity Based</option>
<option value="t">Time Based</option>
</select>
可能重複[如何選擇/獲得硒2下拉選項(HTTP:/ /stackoverflow.com/question s/6430462 /如何選擇下拉選項在硒-2) – Flawyte