Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/332.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何使用splinter查找没有名称的按钮_Python_Splinter - Fatal编程技术网

Python 如何使用splinter查找没有名称的按钮

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

我有这个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()
这样就行了