|
<div class="auth-select bg-white clearfix re">
<input id="borrowPeriod" value="" style="display:none;" autocomplete="off" name="borrowPeriod"/>
<a class="b9 flip" onclick="toggleDropdown('dropdown');" href="javascript:void(0);">
<div id="dropdown" class="auth-select-drop-height bg-white ab panel" style="display: none;" onblur="this.style.display='none';" tabindex="1">
<ul>
<li>
<a onclick="borrowPeriodChange('borrowPeriod','borrowPeriodText','7','7天','dropdown')">7天</a>
</li>
<li>
<a onclick="borrowPeriodChange('borrowPeriod','borrowPeriodText','14','14天','dropdown')">14天</a>
</li>
<li>
<a onclick="borrowPeriodChange('borrowPeriod','borrowPeriodText','21','21天','dropdown')">21天</a>
</li>
<li>
<a onclick="borrowPeriodChange('borrowPeriod','borrowPeriodText','30','30天','dropdown')">30天</a>
</li>
</ul>
</div>
</div>
<div class="m20b fl">
<div class="oh p20l lh30 b9">
</div>
这是页面代码,下面的是我的定位:
driver.find_element_by_id("borrowPeriodText").click() #点击,下拉框可见
time.sleep(1)
drop=driver.find_element_by_id("dropdown")
drop.find_element_by_link_text("7天").click() #点击后无反应 |
|