Python 如何使用splinter查找没有名称的按钮
我有这个html:Python 如何使用splinter查找没有名称的按钮,python,splinter,Python,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
<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()
这样就行了