0 votes
1 view
in Devops and Agile by (25k points)

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 the 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 trying to click on add button

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">**



1 Answer

0 votes
by (63.3k points)

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

It clearly says, the element we want to click is hidden by some other element div, which would receive the click. Selenium identifies the elements only if the browser zoom is 100% ie. default. If it's different then the wrong element will be selected and actions will be performed on them 

You can try a few things:

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

 driver.manage().window().maximize() ;

2. Use JavaScript to click the element

WebElement element = driver.findElement(By.<locator>);

JavascriptExecutor executor = (JavascriptExecutor)driver;

executor.executeScript("arguments[0].click()", element);

Welcome to Intellipaat Community. Get your technical queries answered by top developers !