-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
It's possible for calling the FrameSupport methods that take a Page object to lead to a MissingMethodException.
You can reproduce this with this branch of the Geb gradle example that uses the GroovyDoc page: https://github.com/jonnybot0/geb-example-gradle/tree/bug-example
You can run ./gradlew chromeTest --tests GebGroovyDocSpec
I suspect this is because the wrong private withFrame method in DefaultFrameSupport gets called. If I change the call in the page module to either pass mainFrame.firstElement() or don't provide a page object argument at all, the test works as expected (though in the latter case I have to refactor how I invoke my Page).
GebGroovyDocSpec > can navigate packages FAILED
groovy.lang.MissingMethodException: No signature of method: org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.frame() is applicable for argument types: (geb.content.TemplateDerivedPageContent) values: [GebGroovyDoc -> mainFrame: geb.navigator.DefaultNavigator]
Possible solutions: frame(int), frame(java.lang.String), frame(org.openqa.selenium.WebElement), wait(), find(), grep()
at geb.frame.DefaultFrameSupport.executeWithFrame(DefaultFrameSupport.groovy:66)
at geb.frame.DefaultFrameSupport.withFrame(DefaultFrameSupport.groovy:44)
at geb.Page.withFrame(Page.groovy:118)
at GebGroovyDoc.browsePackage(GebGroovyDoc.groovy:17)
at GebGroovyDocSpec.can navigate packages(GebGroovyDocSpec.groovy:9)
Reactions are currently unavailable