Selenium Web Driver & Java. Element is not clickable at point (x, y). Other element would receive the click

前端 未结 8 1697
北恋
北恋 2020-11-21 04:08

I used explicit waits and I have the warning:

org.openqa.selenium.WebDriverException: Element is not clickable at point (36, 72). Other element wou

8条回答
  •  萌比男神i
    2020-11-21 04:50

    Can try with below code

     WebDriverWait wait = new WebDriverWait(driver, 30);
    

    Pass other element would receive the click:

        boolean invisiable = wait.until(ExpectedConditions
                .invisibilityOfElementLocated(By.xpath("//div[@class='navbar-brand']")));
    

    Pass clickable button id as shown below

        if (invisiable) {
            WebElement ele = driver.findElement(By.xpath("//div[@id='button']");
            ele.click();
        }
    

提交回复
热议问题