I am using Angular Js application. And auotmating using selenium and Java.Whenever I try clicking on on button getting exception as.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Element <button .</button> is not clickable at point (502, 85). Other element would receive the click: <div class="col-sm-12 move-buttons">...</div>
Tried many option but none worked. Any solution is welcomed. Thanks in Advance.!! This is the div which looks like
<div class="col-sm-1">
<div class="row zhide-buttons" xpath="1">
<div class="col-sm-12 move-buttons">
class="btn btn-primary move-button ng-scope" ng-disabled=""> <i class="fa fa-plus fa-2x"></i> </button><!-- end ngIf:
<i class="fa fa-minus fa-2x"></i> </button>
</div>
</div>
I tried using with xpath 1.//div[contains(@class,'col-sm-1')]//button[1] 2.//i[@class='fa fa-plus fa-2x'] 3.using the x,y coordainate using Action Class
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[contains(@class,'col-sm-1')]//button[1]")));
Here is my sample code
WebElement element= driver.findElement(By.xpath("//div[contains(@class,'col-sm-1')]//button[1]"));
js.executeScript("arguments[0].scrollIntoView(true);",element);
js.executeScript("arguments[0].click();", element);
Also I tried normal locating element and clicking onto it. This also gives same error.
So ultimately I am not able to click on this button