Selenium Exception error -Element is not clickable at point x y Other element would receive the click

0 votes

I am adding a customer in a billing software through selenium web driver,but after providing all the details, It is not performing click operation over the add button and showing the error -  

"Exception in thread "main" org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element <button type="button" class="btn  btn-info btn-sm" name="btnAddCust" id="btnAddCust" data-toggle="modal" data-target="#CustModal" title="Add Customer">...</button> is not clickable at point (317, 377). Other element would receive the click: <input type="text" name="birthDate" class="form-control pull-right" id="birthDate" data-mask=""> "

I am using the code  - 

Thread.sleep(1000);
        //driver.findElement(By.xpath("//*[@id=\"btnAddCust\"]")).click();
        WebElement el = driver.findElement(By.id("btnAddCust"));
        el.click();
May 29, 2019 in Selenium by Kumar
73,685 views

4 answers to this question.

0 votes

Hi Kumar, you can use implicit_wait() method to let the driver identify elements properly. Or, you can also use relative_xpath to locate the element. You can get the button by xpath using ChroPath.

answered May 29, 2019 by Abha
• 28,140 points
+3 votes

If waitings for element, sleeps and oher stuffs like this are not working, try to click using JS, because probably something is overlaying this element.
Something like this:

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

For details, You can even check out Selenium concepts with the Selenium online training.

answered Dec 13, 2019 by Douglas
Thanks it worked for me
Thanks it works for me too, i had a problem when i had to click on a div and no problem with this code ! :)
Thank u so much! That was the simplest of the available solutions on the internet! I spent hours to learn different other ways and this works as expected!
Thanks for your contribution. Do Upvote the answer in case you found it helpful.

Please register at Edureka Community and earn credits for every contribution. A contribution could be asking a question, answering, commenting or even upvoting/downvoting an answer or question.

These credits can be used to get a discount on the course. Also, you could become the admin at Edureka Community with certain points.

Cheers!
Super !!!

Merci bien
Thank you so much, very helpful post.
Thank you very much . I was looking for the solution for this error since long time. But finally got it.
Thank you So much !! I have been trieng 100's of option . this exact code worked for me
thanks it worked

How to select menu with html like this? Semantic UI item menu three

Example https://semantic-ui.com/collections/menu.html

<div class="ui item menu three" data-v-1580d320=""><span data-v-1580d320="" class="item"><!---->
              Jual
            </span><span data-v-1580d320="" class="item active"><i data-v-1580d320="" aria-hidden="true" class="fa fa-check"></i>
              Sewa
            </span><span data-v-1580d320="" class="item"><!---->
              Jual &amp; sewa
            </span></div>

Try this:

$('.ui .item').on('click', function() {
   $('.ui .item').removeClass('active');
   $(this).addClass('active');
}); 
Hi Kim, I want to select the element with text 'Sewa' from ui menu using vba, please help. thanks
If you have 2 or 10 menu's on your page as is the case with you,then you would have to separate them with different classes.
Thanks. That worked.
Hi @Sayan Ghosh Dastidar, thank you for your contribution to the Edureka Community.

Register/Sign up on the community to gain points for further contributions. You may ask questions, answer, upvote, and downvote an answer. Each of these would fetch you points and you could be among the top contributors and win exciting merchandise from Edureka.

Cheers!
Thanks Douglas
0 votes

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

or 

WebElement element = driver.findElement(By("element_path"));
Actions actions = new Actions(driver);
actions.moveToElement(element).click().perform();
answered Sep 3, 2020 by Sri
• 3,190 points
0 votes

Two things can go wrong in this scenario:

  1. The button is not found (and thus you would have NullPointerException on method click()) so it will break before with NoSuchElementException.
  2. The button is not clickable (for some reasons) - and then you will have ElementNotClickableException.

I'm not logging each step. I'm logging Exceptions on Framework level + doing screenshots on Exception or failing assertion).

So you are safe with removing it and not gaining much (you wouldn't analyze 10000 lines of logs to check if something was logged).

answered Dec 10, 2020 by Gitika
• 65,770 points

Related Questions In Selenium

0 votes
1 answer

What is the actual conflict while performing click() on web element, and getting an error like element is not clickable at point(x,y)?

Hey @sastry, the error Element is not clickable ...READ MORE

answered Nov 27, 2019 in Selenium by Sirajul
• 59,230 points
3,522 views
0 votes
1 answer

Selenium-Debugging Error: Element is not clickable at point (X,Y)

Another element is covering the element you ...READ MORE

answered Jul 2, 2018 in Selenium by Samarpit
• 5,910 points
8,938 views
+1 vote
5 answers

Getting this error: “Element is not clickable at point”

There are 3 possible solutions for this: 1. ...READ MORE

answered Apr 21, 2018 in Selenium by king_kenny
• 3,710 points
83,161 views
0 votes
2 answers

Check that the element is clickable or not in Selenium WebDriver

Hi , you want to know only is ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
34,196 views
+1 vote
0 answers

python selenium error: element is not attached to the page document

I am scraping Banggood, the problem is ...READ MORE

Apr 10, 2020 in Selenium by eslam
• 130 points
10,024 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,673 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,142 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,221 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,874 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP