我对这种错误有疑问:
元素在点 (791, 394) 处不可单击。其他元素将收到点击: 命令持续时间或超时:66毫秒
谁知道是怎么回事?我正在使用 selenium 网络驱动程序 2.52 和 firefox 版本 43.5
这是部分代码:
private static void waitForLoadingSpinner() throws Exception {
log("wait for loading spinner");
Thread.sleep(1000);
element = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='loadingGlassPane']")));
element.click();
wait.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath("//div[@id='loadingGlassPane']")));
例如,在检查城市后,我的申请按钮不起作用。
最佳答案
尝试使用以下代码。
WebDriverWait wait =new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.elementToBeClickable(By locator)).click();
关于html - 元素在 Firefox 中不可点击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39659108/