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)