Run element is not clickable at point (1096, 26) on chrome)

Source: Internet
Author: User

The normal running script on Firefox prompts "element is not clickable at point (1096, 26)" on chrome. To analyze the cause, you must not be unable to click because the page element does not exist. Or the button to be clicked is not in the preview range.
It was later found that it was blocked by a pop-up layer of the previous step. Because a modal is displayed in the previous step, when modal is disabled, WebDriver immediately executes the next step and clicks a link. At this time, modal may not be completely closed.
The solution is to wait until the pop-up layer is completely closed and the link can be clicked before execution.

Webdriverwait wait = new webdriverwait (driver, 15); wait. until (expectedconditions. elementtobeclickable (. ID ("ID of the element"); // wait until the positioning element can be clicked to use the above method to solve the problem, I really don't understand why it doesn't work. Finally, a simple thread is directly added between the two steps. the sleep (2000) command solved the problem. As for why FF can run normally, it is not clear. · maybe selenium supports better.

Another case is that elements outside the view can be solved by calling JS, but we haven't tried it yet. Make a record:

(JavascriptExecutor) driver).executeScript(                                "arguments[0].scrollIntoView(true);", webElement);
webElement.click();

Run element is not clickable at point (1096, 26) on 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.