Other element would receive the click

1,153 views
Skip to first unread message

Jon Alsop

unread,
Jan 21, 2016, 8:27:28 AM1/21/16
to Selenium Users
Hi all. I was wondering if any of you would happen to know a workaround for the below error.

OpenQA.Selenium.WebDriverException : Unexpected error. Element is not clickable at point (611, 522.2000122070312). Other element would receive the click: <div class="pq-grid-footer"></div>

I am using Selenium Version 2.48.2 C# bindings in NUnit 3.01 on Firefox. I have tried using a javascript executor to scroll to the element required (id=btnAddReason), tried to wait for the above div element to not be displayed, tried to move to the correct element before clicking it but all have the same error message displayed.

Thanks in advance

Jon

murali seleniumtrainer

unread,
Jan 22, 2016, 12:10:30 PM1/22/16
to Selenium Users
Hi,

This link https://code.google.com/p/selenium/issues/detail?id=2766 helps you in this case..

Did you tried, scrolling to element
using actions to move to required element with off-set values to simulate click at end/start of element and then click

Thank You,
Murali
seleniumtrainer.com

U.D

unread,
Jan 23, 2016, 1:41:39 AM1/23/16
to Selenium Users
Hi,

I experienced the exact same error in chrome. Switching containers helped resolved the error;  Sample code below...hope this helps.

List<WebElement> availableAttributes = ATFHandler.getInstance().getWebAutomation().getWebDriver()
.findElements(By.cssSelector("div[class*='attribute-set']"));

for (WebElement attributeSet : availableAttributes) {
List<WebElement> choices = attributeSet.findElements(By.tagName("label"));

for (WebElement selection : choices) {
// Choices are sometimes disabled but still displayed
if (!selection.getAttribute("class").toString().contains("disabled")) {
selection.click();
break;
}
}
}
}


~U.D

Rahul Kote

unread,
Jan 23, 2016, 10:02:00 PM1/23/16
to Selenium Users
This is because some other element is overriding your current and webdriver is not able to click on your target element. It mostly occur in cases where header of page remains always on top. You can try browser.execute_script("window.scrollTo(0,0);") . I had faced the same and scrolling to top solved this issue or scroll to point where no other element will override your target element

Scrolling to element will never help ;) , but scrolling to top will definitely can (y)



On Thursday, January 21, 2016 at 6:57:28 PM UTC+5:30, Jon Alsop wrote:

张加林

unread,
Jan 25, 2016, 9:08:40 PM1/25/16
to Selenium Users
according to my experience, this is because the element you are trying to click is not in view, you need to scroll down the page until the element is in view.  google "selenium scroll down page" will help.

在 2016年1月21日星期四 UTC+8下午9:27:28,Jon Alsop写道:

external...@decathlon.com

unread,
Jan 26, 2016, 9:56:58 PM1/26/16
to Selenium Users
Hi, 

Had the same problem on some random element (most are select inputs ).
Tried to downgrade to 2.48.2 and everything seems to work as expected. 
Maybe an issue in 2.49 release ? 

Veera K

unread,
Jan 27, 2016, 6:45:28 AM1/27/16
to Selenium Users
1.You can do mouseOver on the element which you want to click, like below: WebElement element = driver.findElement(By.id("")); Actions action = new Actions(driver); action.moveToElment(element).click().build().perform(); 2.You can use scrollToView() before click command. 3.You can check for the visibility of the element before click, like below: element.isDisplayed();
On Thursday, January 21, 2016 at 6:57:28 PM UTC+5:30, Jon Alsop wrote:

Rachel Deng

unread,
Jan 27, 2016, 10:42:16 PM1/27/16
to Selenium Users
Also experiencing the same issue after upgrade to 2.49.
But 2.48.2 didn't work for me. I have to use 2.48.0.

Shawn McCarthy

unread,
Jan 28, 2016, 12:59:26 AM1/28/16
to Selenium Users
Reply all
Reply to author
Forward
0 new messages