Selenium Exception错误-元素在(x,y)点不可单击。其他元素将获得点击

时间:2019-05-28 12:07:53

标签: java selenium-webdriver webdriver

我正在通过Selenium Web驱动程序在计费软件中添加一个客户,但是在提供了所有详细信息之后,它没有对添加按钮执行点击操作并显示错误-

"Exception in thread "main" org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element <button type="button" class="btn  btn-info btn-sm" name="btnAddCust" id="btnAddCust" data-toggle="modal" data-target="#CustModal" title="Add Customer">...</button> is not clickable at point (317, 377). Other element would receive the click: <input type="text" name="birthDate" class="form-control pull-right" id="birthDate" data-mask=""> ". 

我正在使用代码-

//添加客户

Thread.sleep(1000);
        //driver.findElement(By.xpath("//*[@id=\"btnAddCust\"]")).click();
        WebElement el = driver.findElement(By.id("btnAddCust"));
        el.click();

0 个答案:

没有答案