Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultFrameSupport fails when providing a Page Object in some scenarios #591

Closed
jonnybot0 opened this issue Sep 11, 2019 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@jonnybot0
Copy link

@jonnybot0 jonnybot0 commented Sep 11, 2019

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)
@erdi erdi self-assigned this Oct 18, 2019
@erdi erdi added the Bug label Oct 18, 2019
@erdi erdi added this to the 3.2 milestone Oct 18, 2019
@erdi erdi closed this in 8877c7e Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants