element click intercepted

92 views
Skip to first unread message

Nortier David

unread,
Aug 30, 2023, 2:32:19 AM8/30/23
to seleniu...@googlegroups.com

Hello

 

C# - Selenium

 

I want to click on a button with this.Driver.FindElement(By.Id(key)).click()

Element is found

But the click gives an error :

 

element click intercepted: Element ... is not clickable at point (839, 385). Other element would receive the click

 

But there’s nothing “above’ the button

 

 

Who can help me ?

Thank you

 

 

  David

 

 

 


====== DISCLAIMER ======

https://www.cph.be/maildisclaimer

Lyov Hambardzumyan

unread,
Aug 30, 2023, 2:35:01 AM8/30/23
to seleniu...@googlegroups.com


Ср, 30 авг. 2023 г. в 10:32, Nortier David <N...@cph.be>:

Hello

 

try do that click in javascriptexecuter 

 

 

 


====== DISCLAIMER ======

https://www.cph.be/maildisclaimer

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/079bd7b3848a4afa8c20e5a859b9efda%40cph.be.

ddlionx

unread,
Aug 30, 2023, 2:40:08 AM8/30/23
to seleniu...@googlegroups.com
You could try using elementsFromPoint at that location to see what the browser thinks is in the way of whatever you want to click. 

--

ddlionx

unread,
Aug 30, 2023, 2:41:04 AM8/30/23
to seleniu...@googlegroups.com

Primus Pares

unread,
Aug 30, 2023, 5:44:36 AM8/30/23
to seleniu...@googlegroups.com
 ((IJavaScriptExecutor)driver).ExecuteScript("arguments[0].style.display = 'block';", element);           
 ((IJavaScriptExecutor)driver).ExecuteScript("arguments[0].click();", element);

ср, 30 авг. 2023 г. в 14:31, Nortier David <N...@cph.be>:
--

SuperKevy

unread,
Aug 30, 2023, 9:43:06 PM8/30/23
to Selenium Users
It's likely a parent child relationship (ancestors.   Add the parent to the click link, its likely a div or table. 
So example driver.div.button(id).click

Md.Rasel Kabir

unread,
Aug 30, 2023, 11:53:29 PM8/30/23
to Selenium Users
Hi,
In this case, Javascriptexecutor can help.

For example: driver.execute_script("arguments[0].click();", element)

Shivam Kumar Bhatnagar

unread,
Aug 30, 2023, 11:57:33 PM8/30/23
to seleniu...@googlegroups.com
Hi,
In this case, the Javascript executor can help.



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/079bd7b3848a4afa8c20e5a859b9efda%40cph.be.

"The content of this email is confidential and intended solely for the use of the individual or entity to whom they are addressed. It is strictly forbidden to share any part of this message with any third party, without the written consent of the sender. If you have received it by mistake, please inform us by an email reply and then delete the message. If you are not the intended recipient, you are notified that disclosing, copying, distributing, or taking any action in reliance on the contents of this information is strictly prohibited".

Ayush Yadav

unread,
Aug 31, 2023, 1:00:32 AM8/31/23
to seleniu...@googlegroups.com
Hi,
Try to visualise the problem in browser, there must be some popup or another button which is superimposed, and see in the whole page which button receives it. 

--

Dheeraj Goyal

unread,
Aug 31, 2023, 2:25:01 AM8/31/23
to seleniu...@googlegroups.com
Use wait for 2 to 5 sec before the argument 

On Wed, 30 Aug 2023, 12:02 Nortier David, <N...@cph.be> wrote:
--

Nortier David

unread,
Aug 31, 2023, 2:58:46 AM8/31/23
to seleniu...@googlegroups.com

Thanks for your responses

 

It’s ok withscript.

 

The question is why ? 😊

Why sometimes javascript and why sometimes .click() from Seleniuum ?

 

 

David

 

De : seleniu...@googlegroups.com <seleniu...@googlegroups.com> De la part de Md.Rasel Kabir
Envoyé : jeudi 31 août 2023 05:53
À : Selenium Users <seleniu...@googlegroups.com>
Objet : [selenium-users] Re: element click intercepted

 

ATTENTION : cet e-mail provient d'une personne externe. Vérifiez toujours l’expéditeur avant d’ouvrir les pièces jointes ou de cliquer sur les liens.

--

You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

ddlionx

unread,
Aug 31, 2023, 3:08:39 AM8/31/23
to seleniu...@googlegroups.com
Because another element would receive the click. You said so yourself in your initial question. 

Ayush Yadav

unread,
Aug 31, 2023, 1:03:31 PM8/31/23
to seleniu...@googlegroups.com
Trust me, sometimes it's just not worth the time to investigate it would cone out to be something trivial, and the chance that discovering something will help you with your next project is veey small.
Learn what helps in this situation and move on. 

Adrian

unread,
Aug 31, 2023, 4:15:29 PM8/31/23
to Selenium Users
Hi,
You can't actually fix this yourself.
If you bring up the developer tools you can find the element that is sitting on top of the element you want to click.
When I get this issue, I have to get the developers to move the elements so that they don't overlap and then I can click on them.


Cheers,
Adrian.
Reply all
Reply to author
Forward
0 new messages