I’ve had a robot running successfully in both our CI/CD and locally successfully for two years now. We’re running our tests in headless chrome and we’ve defaulted to using standard keywords such as Open Headless Chrome Browser - nothing fancy.
Suddenly, for no obvious reason, the robot fails when running headless, and errors imply that various elements on the page are not visible. I ran the robot without headless and it runs fine. I admit that the some of the page elements look like they need to be scrolled to - but the robot still runs successfully without any other intervention than me replacing the Keyword “Open Headless Chrome Browser” with “Open Chrome Browser”.
Just to provide some error logs - I will get this (not always - but sometimes) when I run headless:
Suspended due to logged failure: ElementClickInterceptedException: Message: element click intercepted: Element … is not clickable at point (787, 792). Other element would receive the click:
Obviously the above error indicates one element is sitting on top of the desired element - but we haven’t changed the UI at all. I’m at a loss as to where to even look. I’ve tried various things I’ve seen like adding options around --window-size and --headless and --disable-gpu, but none seem to have an effect. I have to believe this has something to do with Chromedriver - but I’m not sure where to look. Has anyone seen this and do you have any suggestions?
Did you try to take screenshot of the page and Get Window Size to confirm what’s going on when Chrome is opened?
And what about the Seleniumlibrary and Selenium version?
There have been some issues with Chrome 133, so do you have a chance to run on version 132 (both if you have a fixed Chrome version), or just downgrade temporary the Chromedriver version to check if this works?
The robot is looking for the table of bonds (Simple Bond A, Simple Bond B) and as you can see - it is visible and this is exactly what I am expecting. I will try and revert to Chrome 132 and let you know. Thanks again.
Hank
One scenario that causes this that Other element would receive the click: issue is some overlays with incorrect Z order.
When user does click on element, essentially its just a click on x,y coordinates on the viewport. Now, because of event bubbling, when user clicks on x,y but there’s element at highest Z order, that click event will still go thru the element user really wants to click becauses of said event bubbling unless the element at highest Z plane explicitly disables that.
Now, when selenium clicks at the same location, it will check which element really receives the initial click and throws that error if the selector is not the same as what user provided.
In your image, we see that the table looks a bit like modal dialog. There is a slight chance that there’s a fullscreen overlay that is blocking your click from Selenium’s point of view. But then again you said “we have not changed the app” so ymvv.
When i initially wrote SeleniumTestability, i wrote few keywords to handle exactly these sort of scenarios. There’s a keyword to get the topmost (z order plane) WebElement at given coordinates and another keyword to temporary disable/hide it so that selenium can click on the actual element. Since the project is dead now (no maintainers), all i can suggest is that you check how the javascript parts that handle getting the webelement that would actually receive the click and check with your devs if there’s actual issue with that and/or try to disable it at runtime.
Thanks Rasjani - this is helpful and I will investigate. You’re right - it is a modal. A few other bits of info from my testing last night:
Our CI/CD pipeline (Github Actions running Linux) works fine - no errors in any robot. This error appears to be showing only in local testing on a MAC.
My initial comment was that when setting Headless = False, the robots ran. Last night, in local testing, one (of 5) actually failed. It was the first time I had seen a failure in these test when not running in Headless mode.
My gut says there is something ging on with the latest version of the chromedriver - at least on a Mac, but nothing firm yet. Thanks again for your thoughts.