Element is not clickable on point error in Chrome

Source: Internet
Author: User
Tags python script

I see this only in Chrome.

The full error message reads:

"Org.openqa.selenium.WebDriverException:Element is not clickable on point (411, 675). Other element would receive the click: ... "

The element that ' would receive the click ' was to the side of the element in question, not on top of it and not overlapping It, not moving around the page.

I have tried adding a offset, but this does not the work either. The item is on the displayed window without any need for scrolling.

----------------------------------

This was caused by following 2 types:

1.The element is not a visible to click.

Use the Actions or javascriptexecutor for making it to click.

by Actions:

WebElement element = driver.findElement(By("element_path"));Actions actions = new Actions(driver);actions.moveToElement(element).click().perform():

by Javascriptexecutor:

JavascriptExecutor jse = (JavascriptExecutor)driver;jse.executeScript("scroll(250, 0)"); // if the element is on top.jse.executeScript("scroll(0, 250)"); // if the element is on bottom.

Or

Then click on the element.

2.The page is getting refreshed before it is clicking the element.

For this, make the page to wait for few seconds.

--------------------

1.The element isn't visible at the view point (not seen in the screen)

Try this

JavascriptExecutor jse = (JavascriptExecutor)driver;jse.executeScript("scroll(250, 0)"); // this will scroll uporjse.executeScript("scroll(0, 250)"); // this will scroll down

2.Element is a present at the time of execution. Use webdriverwait to until the element is present.

WebDriverWait wait = new WebDriverWait(driver, 15);wait.until(ExpectedConditions.elementToBeClickable(By.id("ID of the element")));
---------------------------
In my Python script, I try the second method, details as below

js_="var q=document.body.scrolltop=10000"driver.execute_script (js_)

Attation:in Chrome We should use "Document.body.scrollTop", "document.documentElement.scrollTop" doesn ' t work in chrome

If you want to get the value of scrolltop, can-you-try this "Var stop=document.body.scrolltop+document.documentelement . scrolltop; "

Element is not clickable on point error in Chrome

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.