In regards to the Webdriver error
Element is not clickable at point (X, Y). Another element would recieve the click instead.
For ChromeDriver, this is addressed at Debugging "Element is not clickable at point" error, however the issue can occur in Firefox as well.
What are the best ways to resolve this when it occurs in FirefoxDriver?
The exception “Element is not clickable at point” might be thrown when the element is not under focus or the action is being performed on the incorrect WebElement. In such cases, you have to switch to the actual element and perform the click action.
We can list the most common reasons for click problems as being one of the following: Wrong web element locations. The existence of a web element that obscures the web element that we want to click. The Selenium WebDriver works much faster than the response of the application.
WebDriverException - Element is not clickable at point (xx, xx). Other element would receive the click'. This happens when the element is loaded into the DOM, but the position is not fixed on the UI. There can be some other divs or images or ads that are not loaded completely.
This happens in the below cases-
When the element is loaded into the DOM, but the position is not fixed on the UI. There can be some other div or images that are not loaded completely.
The page is getting refreshed before it is clicking the element.
Workaround
I was facing the same issue, the page load time was more and a loading icon was overlapping on entire web page.
To fix it, I have implemented WebDriverWait ExpectedConditions, which waits for the loading icon to disappear before performing click action on an element
Call this function before performing an action (I am using data driven framework)
public void waitForLoader () throws Exception {
try {
String ObjectArray[]=ObjectReader.getObjectArray("LoadingIcon");
if(checkElementDisplayed(ObjectArray[3],ObjectArray[2]))
{
WebDriverWait wait = new WebDriverWait(remotewebdriver,10);
wait.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath(ObjectArray[3])));
}
} catch (NoSuchElementException e) {
System.out.println("The page is loaded successfully");
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With