selenium exception

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

selenium exception

Ananya Sarkar
how to resolve 

elementclickinterceptedexception.

when multiple elements are present with same attribute and there is no specific attribute to find the element. Xpath and css selector doesnot 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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CABA-N%2BWkYTDHhPisjP2L3MvLptvX_BPLDir8uqNX1Nry5qUhFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

intercept.png (185K) Download Attachment
application with attributes.png (126K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: selenium exception

Ankit Gupta-2
There could be more button with have class name as "Button"

On Thu, May 3, 2018 at 12:33 PM, Ananya Sarkar <[hidden email]> wrote:
how to resolve 

elementclickinterceptedexception.

when multiple elements are present with same attribute and there is no specific attribute to find the element. Xpath and css selector doesnot 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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CABA-N%2BWkYTDHhPisjP2L3MvLptvX_BPLDir8uqNX1Nry5qUhFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAKrer0CuZbcH9vPPbv5PbzR87gR%2BMf%2B1RDcJeaQuesWbVuDQNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: selenium exception

Jonathan Herbaut
In reply to this post by Ananya Sarkar
Your exception tells you that another IWebElement is targetted by your search. "button" class is obviously too common in your code. Try to combine this class with another one around your target. It's seems that "clsaddbtn" can do the job but I'm sure you will need another one again because I see somes tabs in your browser that maybe hide the same classes.
You can look to PageObject model and use FindBySequence to reach your element.
And another point : Thread.Sleep is evil. If you must wait for your elements, you can use Selenium Wait, because if your server is busy, you will have free exception because your Thread.Sleep will not be enough, and maybe your Thread.Sleep is already too long and you are waiting for nothing.

[FindsBySequence]
[FindsBy(How = How.Id, Using = "elementId", Priority = 0)]
[FindsBy(How = How.Id, Using = "childElementId", Priority = 1)]
public IWebElement thisElement;

2018-05-03 9:03 GMT+02:00 Ananya Sarkar <[hidden email]>:
how to resolve 

elementclickinterceptedexception.

when multiple elements are present with same attribute and there is no specific attribute to find the element. Xpath and css selector doesnot 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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CABA-N%2BWkYTDHhPisjP2L3MvLptvX_BPLDir8uqNX1Nry5qUhFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAH1BzpUy4DX7Po6f-WYPZYaEwcqTGJrLX6kJCCQY47UHK6Tdog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: selenium exception

Rakesh das
In reply to this post by Ananya Sarkar
Hi Buddy
Try to implement javascriptExcutor, check it might be work on your case

On Thu, 3 May 2018, 12:34 pm Ananya Sarkar, <[hidden email]> wrote:
how to resolve 

elementclickinterceptedexception.

when multiple elements are present with same attribute and there is no specific attribute to find the element. Xpath and css selector doesnot 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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CABA-N%2BWkYTDHhPisjP2L3MvLptvX_BPLDir8uqNX1Nry5qUhFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJBug5KjSXLP2WJcvQELX5tgzGpg_%3DTw6mN79iS%2BNwMtRUF33g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.