With regards to another element receiving a click - I know that some drivers, i.e. chrome, raise an exception in that case, just google for "org.openqa.selenium.WebDriverException: Element is not clickable at point". But I don't know how reliable that is given you are using chrome as the driver as far as I can tell and you are not seeing that exception...
Other than that, I unfortunately don't have any advice. I don't know how you would automatically detect that an unintended element received a click. FWIW, it's probably more of a Selenium rather than Geb question, really. On Mon, Feb 24, 2020 at 1:09 PM François Guillot <[email protected]> wrote: > Hi > > I stumbled upon this problem several time. > I select a Navigator and want to click on it. > But it's actually another element that receives the click. > This can happen because Selenium clicks at the middle of the singleElement > represented by this Navigator. > And it could be that something else is displayed at that exact coordinates. > > It works on my machine, but doesn't on others with a different screen > resolution (or when I manually play around with my browser test window > size, because I'm moving it to another screen for instance) > => On my machine, I also have this 'other element', but it's not reaching > the middle of the Navigator I want to click on, so I don't see the problem. > On another browser resolution, the center of the Navigator is obstructed > by this other -clickable- element. And the resulting behavior is not the > expected one, and hard to diagnose. > > Is there a way to ensure that the element that received the click is the > one we targeted ? > I'dl like to print a warning, or even throw when that happens, as it's > clearly not by-design of the test author. > > > Thanks, > > François > > -- > You received this message because you are subscribed to the Google Groups > "Geb User Mailing List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/geb-user/a641fb85-31e0-413f-98e2-b7b8cf569d74%40googlegroups.com > <https://groups.google.com/d/msgid/geb-user/a641fb85-31e0-413f-98e2-b7b8cf569d74%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/CA%2B52dQTOUmWAwrUMsfMg2sXgT%3D%2BjyVoitHFRDhr_a%3DCLM7RLEw%40mail.gmail.com.
