Heim > Web-Frontend > HTML-Tutorial > 请教:日期选择框,selenium如何定位页面元素_html/css_WEB-ITnose

请教:日期选择框,selenium如何定位页面元素_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Freigeben: 2016-06-24 11:51:48
Original
1746 Leute haben es durchsucht

请教,下面的html,如何定位页面元素(年、月),试了好多方法都不可以

<div class="inputRow">
<span>购车日期</span><input id="buyDate" type="hidden" name="buyDate" value="2013-12"><span id="year__jQSelect0" class="dropdown" tabindex="0" style="width: 72px; height: 31px; z-index: auto; position: relative;"><select id="year" class="select_yy select_zdy2" onchange="changeBuyDate(this)" style="display: none;"><option value="2004">2004</option>
<option value="2005">2005</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
<option value="2008">2008</option>
<option value="2009">2009</option>
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014" selected>2014</option></select><span class="dropselectbox select_zdy2" style="z-index: 101;"><h4 class="" style="width: 44px; padding-right: 24px;">2013</h4>
<ul style="width: 63px; display: none; top: 31px;"></ul></span></span><lable style="font-weight:normal;color:white;">年</lable><span id="month__jQSelect1" class="dropdown" tabindex="0" style="width: 72px; height: 31px; z-index: 99;"><select id="month" class="select_mm select_zdy2" onchange="changeBuyDate(this)" style="display: none;"><option value="01"> 01 </option>
<option value="02"> 02 </option>
<option value="03"> 03 </option>
<option value="04"> 04 </option>
<option value="05"> 05 </option>
<option value="06"> 06 </option>
<option value="07"> 07 </option>
<option value="08"> 08 </option>
<option value="09"> 09 </option>
<option value="10"> 10 </option>
<option value="11"> 11 </option>
<option value="12"> 12 </option></select><span class="dropselectbox select_zdy2" style="z-index: 101;"><h4 class="" style="width: 44px; padding-right: 24px;"> 12 </h4>
<ul style="width: 63px; display: none;"></ul></span></span><lable style="font-weight:normal;color:white;">月</lable>
</div>
Nach dem Login kopieren


Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage