【发布时间】:2015-04-10 04:31:37
【问题描述】:
我得到了一个像这样的 html sn-p:
<input type="text" node-type="searchInput" autocomplete="off" value="" class="W_input" name="14235541231062">
这个元素在 html 中唯一的唯一标识是属性node-type="searchInput",所以我想使用 Python selenium 的 some method 来定位它,如下所示:
search_elem = driver.find_element_by_xxx("node-type","searchInput") # maybe?
我已经检查了 selenium(python) document for locating elems,但不知道如何通过 node-type attr 找到这个元素。有没有明确的方法可以在 python selenium 中找到这个元素?
【问题讨论】: