0

I have looked up the similar problems but could not find a solution at all. I have even tried Thread.sleep but it did not work either. I still get the

enter image description here

"org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element ... is not clickable at point (1322, 246). Other element would receive the click: (Session info: chrome=83.0.4103.97)" error.

Here is my code ;

    //click on relative info
    WebDriverWait wait = new WebDriverWait(driver,20);

   driver.findElement(By.cssSelector("div.mat-tab-labels>div:nth-child(3)")).click(); 

    //click on representative
    driver.findElement(By.xpath("(//*[@aria-label=\"Representative\"]//following::span)[1]")).click();
    wait.until( ExpectedConditions.visibilityOfElementLocated( By.cssSelector(".cdk-overlay-pane") ) );

    //select representative
    driver.findElement(By.xpath("//*[@id=\"mat-option-73\"]")).click();

    wait.until( ExpectedConditions.invisibilityOfElementLocated( By.cssSelector(".cdk-overlay-pane") ) );
pppery
  • 3,731
  • 22
  • 33
  • 46

1 Answers1

0

He may have an iframe

If there is an iframe, you need to switch to the iframe

driver.switchTo().frame("iframeId");//iframe id or iframe name

It’s best to post web code

Ruyut
  • 151
  • 11