Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Element is not clickable at point . Other element would receive the click:

Tags:

I'm trying to click a button on top of the page.I'm using CSS selector and it works perfectly fine when I run it in my local eclipse.But when I try to run it on Jenkins server on my local machine it fails, saying element not clickable. When I saw the screenshot of failed test on Jenkins I see that the header is overlapping the button that I want to click. I have tried almost everything using XPath,CSS,move to element,move mouse. But still can't fix it, Someone please help.

I'm tring to click on add buttoun

org.openqa.selenium.WebDriverException: Element is not clickable at point (775.25, 10.166671752929688). Other element would receive the click: <div class="globalHeader-UtilTop"></div> Command duration or timeout: 69 milliseconds Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host', ip: '', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_80'  <div class="Componet-intels**strong text**-Container"> <div class="Componet-intels-Container-Header"> <div class="Componet-intels-Container-Content"> <div class="Componet-intels-Container-Content-Row"> <span class="Componet-intels-Item"> Item # </span> <span class="Componet-intels-Text-Item"> <span class="Componet-intels-Lable-Quantity"> Qty: </span> <span class="Componet-intels-Text-Quantity"> <span class="Componet-intels-Button"> **<input class="Componet-intelsButtonIcon" type="button" value="Add">** </span> </div> 
like image 342
Samantha Avatar asked Aug 12 '16 17:08

Samantha


People also ask

What does element is not clickable at point mean?

The error “element is not clickable at point” is self-explanatory. It means that the element that you’re trying to click on can’t be clicked at that particular point. You’d usually find this error when you locate an element and try to execute a click action on it.

Is there a clickable element in Selenium WebDriver?

selenium webdriver - Element is not clickable at this point. Other element would receive the click - Software Quality Assurance & Testing Stack Exchange Element is not clickable at this point.

Why is my webelement not getting clicked?

Element not getting clicked due to JavaScript or AJAX calls present WebElement element = driver.findElement (By.id ("navigationPageButton")); Actions actions = new Actions (driver); actions.moveToElement (element).click ().build ().perform (); 2. Element not getting clicked as it is not within Viewport

Is the stack exchange element clickable?

Other element would receive the click - Software Quality Assurance & Testing Stack Exchange Element is not clickable at this point. Other element would receive the click Bookmark this question. Show activity on this post.


2 Answers

Element is not clickable at point (775.25, 10.166671752929688). Other element would receive the click:

It clearly says, the element we want to click is hidden by some other element div in this case, which would receive the click.

I think it is a problem with the UI and the header shouldn't hide the element, but you can try few things :

  1. Maximize the window of the browser from webdriver to see if header still hides the element

    driver.manage().window().maximize()  
  2. Use JavaScript to click element

    WebElement element = driver.findElement(By.<locator>); JavascriptExecutor executor = (JavascriptExecutor)driver; executor.executeScript("arguments[0].click()", element)` 
like image 99
Satish Gupta Avatar answered Oct 25 '22 08:10

Satish Gupta


use JavascriptExecutor.:-

WebElement element = driver.findElement(By.<locator>);  JavascriptExecutor executor = (JavascriptExecutor)driver; executor.executeScript("arguments[0].click()", element) 
like image 24
Spike Avatar answered Oct 25 '22 06:10

Spike