标签:coff class slide bsp selector sel esc div ring
用CSS3选择器如何选择 a href="#signin" 这个href的值?
<div class="index-tab-navs"> <div class="navs-slider"> <a href="#signup" class="active">注册</a> <a href="#signin">登录</a> <span class="navs-slider-bar"></span> </div> </div>
方法一:
driver.find_elements_by_css_selector(‘.index-tab-navs .navs-slider a[href]‘)[1]
方法二(推荐):
.navs-slider a[href=‘#signin‘]
标签:coff class slide bsp selector sel esc div ring
原文地址:http://www.cnblogs.com/bigbrother/p/6739429.html