我有以下代碼:如何在DIV找到項目的列表
[![
<div id="s2id_location" class="select2-container location req" style="width: 550px;">
<a class="select2-choice" tabindex="-1" href="javascript:void(0)">
<span id="select2-chosen-1" class="select2-chosen">Current location</span>
<abbr class="select2-search-choice-close"/>
<span class="select2-arrow" role="presentation">
<b role="presentation"/>
</span>
</a>
<label class="select2-offscreen" for="s2id_autogen1"/>
<input id="s2id_autogen1" class="select2-focusser select2-offscreen" type="text" role="button" aria-haspopup="true" aria-labelledby="select2-chosen-1" tabindex="0"/>
</div>
<select id="location" name="currentloc" tabindex="-1" title="" style="display: none;">
<option value="">Current location</option>
<option value="1">Ahmedabad</option>
<option value="2">Bengaluru/Bangalore</option>
<option value="3">Chennai</option>
<option value="4">Delhi</option>
<option value="5">Gurgaon</option>
我該怎麼辦從代碼上方訪問Gurgaon。
這不是一個java問題 – Alvins
它是一個使用java語言的硒webdriver問題。 –