Element MyElement is not clickable at point (x, y)... Other element would receive the click
Element ... is not clickable at point (x, y). Other element would receive the click"
can be caused for different factors. You can address them by either of the following procedures:
- Element not getting clicked due to JavaScript or AJAX calls present
Try to use Actions
Class:
WebElement element = driver.findElement(By.id("id1"));
Actions actions = new Actions(driver);
actions.moveToElement(element).click().build().perform();
- Element not getting clicked as it is not within Viewport
Try to use JavascriptExecutor
to bring the element within Viewport:
JavascriptExecutor jse1 = (JavascriptExecutor)driver;
jse1.executeScript("scroll(250, 0)"); // if the element is on top.
jse1.executeScript("scroll(0, 250)"); // if the element is at bottom.
Or
WebElement myelement = driver.findElement(By.id("id1"));
JavascriptExecutor jse2 = (JavascriptExecutor)driver;
jse2.executeScript("arguments[0].scrollIntoView()", myelement);
- The page is getting refreshed before the element gets clickable.
In this case induce some wait
.
- Element is present in the DOM but not clickable.
In this case add some ExplicitWait
for the element to be clickable.
WebDriverWait wait2 = new WebDriverWait(driver, 10);
wait2.until(ExpectedConditions.elementToBeClickable(By.id("id1")));
- Element is present but having temporary Overlay.
In this case induce ExplicitWait
with ExpectedConditions
set to invisibilityOfElementLocated
for the Overlay to be invisible.
WebDriverWait wait3 = new WebDriverWait(driver, 10);
wait3.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath("ele_to_inv")));
- Element is present but having permanent Overlay.
Use JavascriptExecutor
to send the click directly on the element.
WebElement ele = driver.findElement(By.xpath("element_xpath"));
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].click();", ele);
Element is not clickable at point - other element would receive the click
As per your response :
You will have to scroll down to let the web element available to your script.For that you can use this code :
public static void scrollDown(WebDriver driver, String YoffSet){
JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript(YoffSet);
}
here you can call this method anywhere from your code.
Then you can use this code to interact with the web element :
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("static ID")));
element.click();
Selenium Element click is not clickable at point (52, 346). Other element would receive the click using nodejs
Try replacing this line at the end await driver.findElement(By.xpath("//button[text()='Transfers']")).click();
with this one:
await driver.executeScript("arguments[0].click();", btn);
Python Selenium error Element is not clickable at point
Here is the simple approach that I would follow to select the items from this list.
# select Month from the list.
element = WebDriverWait(driver,10).until(EC.element_to_be_clickable((By.XPATH, "//select[@id='matchStatsDuration']/option[.='Month']")))
element.location_once_scrolled_into_view
element.click()
By this way I don't have to worry about the overlaying top menu, which is obstructing the click on the list element.
Related Topics
Firebaselistadapter Not Pushing Individual Items For Chat App - Firebase-Ui 3.1
Inner Class Can Access But Not Update Values - Asynctask
How to Redirect Multiple Types of Users to Their Respective Activities
Custom Listview Adapter Getview Method Being Called Multiple Times, and in No Coherent Order
How to Read a Text File in Android
How to Display Data from Firestore in a Recyclerview With Android
Can't Create Directory in Android 10
Check Orientation on Android Phone
Why Doesn't "System.Out.Println" Work in Android
Noclassdeffounderror - Eclipse and Android
One Time Login in App - Firebaseauth
How to Set Httpresponse Timeout For Android in Java
How to Request Location Permission At Runtime
Singletons Vs. Application Context in Android
Why Is Processing a Sorted Array Faster Than Processing an Unsorted Array