Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Exception in thread "main" org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element ... is not clickable at point (1075, 323). Other element would receive the click: (Session info: chrome=79.0.3945.130)

How to solve this error for selenium webdriver code..FOR CLICKING THE POST BUTTON using xpath the devloperr donot provide id for that button CODE:

WebElement element1=driver.findElement(By.xpath("//*[@id="SINPost"]/button"));
element1.click();
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
283 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you are using chrome it can happen sometimes, because chrome always tries to click at the middle of the element. What you can do is use JavaScriptExecutor interface of selenium. The code should look like this

JavascriptExecutor js = (JavascriptExecutor) DriverManager.getWebDriver();
js.executeScript("arguments[0].click();", element);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...