selenium报错:is not clickable at point (1214, 124). Other element would receive the clickd

    定位元素没有问题,但是执行脚本时候,循环第二遍时候,就报错is not clickable at point (1214, 124). Other element would receive the click。

  具体错误:selenium.common.exceptions.WebDriverException: Message: unknown error: Element <img src="../images/tianjia_btn_pre.png" id="add" ng-click="showAddUserDialog()" ng-mouseover="changeImage('add','../images/tianjia_btn.png')" ng-mouseout="changeImage('add','../images/tianjia_btn_pre.png')"> is not clickable at point (1214, 124). Other element would receive the click: <div class="modal fade in" role="dialog" id="myModal" aria-hidden="true" style="display: block; padding-right: 17px;">...</div>

   通过错误提示,应该是在循环第二遍点击添加按钮时,被其他元素接受了鼠标单击,也就是被其他元素遮挡,所以在循环点击之前,稍作sleep休眠即可。

猜你喜欢

转载自blog.csdn.net/lvxiaoting/article/details/79992835
124