Element is not clickable at point

308 views
Skip to first unread message

medv...@gmail.com

unread,
Nov 30, 2017, 6:43:46 AM11/30/17
to Geb User Mailing List
hi,

I keep getting this error more and more:

org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (805, 1183)
     
(Session info: chrome=62.0.3202.94)
     
(Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 3.16.0-4-amd64 x86_64) (WARNING: The server did not provide any stacktrace information)

Is there any solution to prevent it or any workaround?

Thank you,
Roland


Brian Kotek

unread,
Nov 30, 2017, 10:41:13 AM11/30/17
to Geb User Mailing List
Most likely the element is animated somehow, so its position is changing. You need to wait for it to stop changing position before you try to trigger a click on it.

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/12461655-78e9-47a1-912b-f9acc1e7b9f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

medv...@gmail.com

unread,
Dec 4, 2017, 8:46:49 AM12/4/17
to Geb User Mailing List
waitFor or sleep does not help me there.

only clicking buttons like this:

WebElement element = driver.findElement(By.xpath(xpath));
JavascriptExecutor executor = (JavascriptExecutor) driver;
executor
.executeScript("arguments[0].click()", element)

any other idea why elements are not clickable?

should I scroll the element to view? is this possible in geb?

sometimes the error message says "cannot focus on element".

thank you,
Roland

On Thursday, November 30, 2017 at 4:41:13 PM UTC+1, brian428 wrote:
Most likely the element is animated somehow, so its position is changing. You need to wait for it to stop changing position before you try to trigger a click on it.
On Thu, Nov 30, 2017 at 6:43 AM, <medv...@gmail.com> wrote:
hi,

I keep getting this error more and more:

org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (805, 1183)
     
(Session info: chrome=62.0.3202.94)
     
(Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 3.16.0-4-amd64 x86_64) (WARNING: The server did not provide any stacktrace information)

Is there any solution to prevent it or any workaround?

Thank you,
Roland


--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.

Marcin Erdmann

unread,
Dec 5, 2017, 2:39:30 AM12/5/17
to geb-...@googlegroups.com
I do believe that Brian is right - the element you are trying to click is most probably temporarily overlaid due to some animation. Especially if the error is intermittent and varies as you describe it.

waitFor will help if you take the time to analyse what is being animated at that particular point in time and wait for it to finish.

Also, you should not need to scroll anything - WebDriver scrolls elements into view automatically before clicking them.

Reply all
Reply to author
Forward
0 new messages