Python 2.7 如何单击a<;部门>;在python中使用SeleniumWebDriver的按钮

Python 2.7 如何单击a<;部门>;在python中使用SeleniumWebDriver的按钮,python-2.7,selenium-webdriver,Python 2.7,Selenium Webdriver,我想在Python2.7中使用SeleniumWebDriver单击UI上可见的按钮“AddNew”,但在使用id或类名时出现错误“找不到元素” 以下是html代码: <div id="buttonAddEditEntryId" class="k-button" title="Add New Record"> <i style="font-size:14px; padding:5px" class="fa fa-plus-circ

我想在Python2.7中使用SeleniumWebDriver单击UI上可见的按钮“AddNew”,但在使用id或类名时出现错误“找不到元素”

以下是html代码:

<div id="buttonAddEditEntryId" class="k-button" title="Add New Record">
                        <i style="font-size:14px; padding:5px" class="fa fa-plus-circle" aria-hidden="true">
                        </i>Add New
                    </div>

新增

您是否尝试过设置任何类型的等待?没有。我是这方面的新手…开始学习testerday本身。我可以单击登录和导航,但无法单击按钮,因此也无法立即找到错误…即使我选择在不同的代码行中单击。请查看此问题和答案:非常感谢…:)
<div id="buttonAddEditEntryId" class="k-button" title="Add New Record">
                        <i style="font-size:14px; padding:5px" class="fa fa-plus-circle" aria-hidden="true">
                        </i>Add New
                    </div>