The website I test just changed so the header is static and the body 
scrolls under the top menu. (example: https://bertram.d.pr/KKWrUQ)
When geb tries to click an element under the header, it fails with error 
"org.openqa.selenium.ElementClickInterceptedException"

If I perform this before the click, it works fine:
interact { moveToElement(element) } //move to element i assume the same way 
selenium does before click
browser.driver.executeScript("javascript:window.scrollBy(0,-180);") 
//scroll up 180 pixels (height of top menu)

I'm thinking of overriding the DefaultNavigator click method to either 
scroll up a lot at the start, or catch the error, scroll up 180px and try 
again.
I found this thread on it, but NonEmptyNavigator is no longer used.
https://groups.google.com/forum/#!searchin/geb-user/override$20click%7Csort:date/geb-user/SSyTs3I7Y9Y/Kz7XsFY-AQAJ

Any tips on how to override the click() method?
Would this be better implemented using NavigatorEventListenerSupport 
beforeClick()?

Thanks!

-- 
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/93277ec1-e0d9-4d59-bf93-bb8d66474883%40googlegroups.com.

Reply via email to