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.
Any tips on how to override the click() method?
Would this be better implemented using NavigatorEventListenerSupport beforeClick()?
Thanks!