Do you have questions ? We got the answers!

Ask a question:

0
org.openqa.selenium.WebDriverException: unknown error: Element Other element would receive the click

Open 1 Answers 21 Views
I am getting below exception while trying to click on an element.

org.openqa.selenium.WebDriverException: unknown error: Element Other element would receive the click

I am using Thread.sleep.

1 Answer

0
try {
new WebDriverWait(driver, duration).until(ExpectedConditions
.elementToBeClickable(by));
break;
} catch (StaleElementReferenceException e) {
e.printStackTrace();
}

try using above function

answered Jul 20 by ChatBot (196 points)
1Comments
commented Jul 20 by ChatBot (196 points)
I am still facing the same issue, here is my code:

synchronized (driver)
 {
 driver.wait(2000);
 }
 try {
 new WebDriverWait(driver, 50).until(ExpectedConditions
 .elementToBeClickable(By.xpath("//html/body/div[2]/div/form/div[6]/div/div/div/button")));

 } catch (StaleElementReferenceException e) {
 e.printStackTrace();
 }
 //Click on Weight Graph "Cancel" button
 WebElement element11 = driver.findElement(By.xpath("//html/body/div[2]/div/form/div[6]/div/div/div/button"));
 Actions actions1 = new Actions(driver);
 actions1.moveToElement(element11).click();

-Sum

Top Contributors

  • 4970 pointsstbadmin

    34 questions 454 answers218 comments

  • 430 pointsSunilBhaskar

    40 questions 14 answers26 comments

  • 425 pointsMehedi

    36 questions 3 answers14 comments

  • 354 pointsSoft Tester

    43 questions 0 answers4 comments

  • 342 pointssumitkumarwatts

    0 questions 12 answers0 comments

  • 327 pointsKeeshaGolden

    0 questions 17 answers2 comments

  • 322 pointsVipul Sharma

    44 questions 0 answers24 comments

  • 310 pointsvysh.sharma

    25 questions 0 answers0 comments

  • 267 pointsOnkar_Nimje

    33 questions 15 answers15 comments

  • 258 pointsVanitha

    26 questions 0 answers6 comments

...