[英]How to find button without name using splinter
我有這個 html:
<a role="button" title="Datei hinzufügen" class="btn btn-secondary btn-sm" href="#" id="yui_3_17_2_1_1622033800890_3429">
<i class="icon fa fa-file-o fa-fw " aria-hidden="true"></i>
</a>
如何使用 Splinter 找到它? 我已經嘗試過find_by_text
, find_by_name
, find_by_id
, find_by_xpath
(只需從瀏覽器控制台復制 xpath ),這些都不起作用
弄清楚了,我不得不使用底層的 selenium 驅動程序
browser.driver.find_element_by_css_selector(".btn-secondary").click()
這樣它就起作用了
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.