I had a feeling I saw something like what you describe before. The symptoms are exactly as the ones I included in an issue filed agains 2.5.0-alpha-1: https://issues.apache.org/jira/browse/GROOVY-8201.
Any chance you're on the bleeding edge and using a 2.5.x line version of Groovy? On Tue, Apr 3, 2018 at 10:13 PM, Marcin Erdmann <[email protected]> wrote: > Hi Dustin, > > Looks like it might be a potential bug. Can you please confirm which > version of Geb and Groovy you're running? > > Thanks, > Marcin > > On Tue, Apr 3, 2018 at 9:22 PM, Dustin Sawatzky <[email protected] > > wrote: > >> Hey, >> >> I'm trying to use the withAlert block to dismiss an alert, but it doesn't >> seem to be working. Just invoking withAlert is causing an error in the >> DefaultAlertAndConfirmSupport class. Here is the error: >> >> >> (Session info: chrome=65.0.3325.181) >> (Driver info: chromedriver=2.35.528157 >> (4429ca2590d6988c0745c24c8858745aaaec01ef),platform=Mac >> OS X 10.13.4 x86_64) (WARNING: The server did not provide any stacktrace >> information) >> Command duration or timeout: 0 milliseconds >> Build info: version: '3.6.0', revision: '6fbf3ec767', time: >> '2017-09-27T15:28:36.4Z' >> System info: host: 'OSX-A1G8WM', ip: 'fe80:0:0:0:18eb:50cd:deb3:f656%en0', >> os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.4', >> java.version: '1.8.0_77' >> Driver info: org.openqa.selenium.chrome.ChromeDriver >> Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, >> platform=MAC, acceptSslCerts=false, acceptInsecureCerts=false, >> webStorageEnabled=true, browserName=chrome, takesScreenshot=true, >> javascriptEnabled=true, platformName=MAC, setWindowRect=true, >> unexpectedAlertBehaviour=ignore, applicationCacheEnabled=false, >> rotatable=false, networkConnectionEnabled=false, >> chrome={chromedriverVersion=2.35.528157 >> (4429ca2590d6988c0745c24c8858745aaaec01ef), >> userDataDir=/var/folders/wh/qtg_28g117v905f94sd7zdc1k2z9x8/ >> T/.org.chromium.Chromium.z9yEI6}, takesHeapSnapshot=true, >> pageLoadStrategy=normal, unhandledPromptBehavior=ignore, >> databaseEnabled=false, handlesAlerts=true, version=65.0.3325.181, >> browserConnectionEnabled=false, nativeEvents=true, >> locationContextEnabled=true, cssSelectorsEnabled=true}] >> >> Caused by: groovy.lang.MissingMethodException: No signature of method: >> geb.navigator.NonEmptyNavigator.getJs() is applicable for argument >> types: () values: [] >> Possible solutions: getX(), getY(), getX(), getY(), >> getAt(groovy.lang.EmptyRange), getAt(groovy.lang.Range) >> at geb.navigator.NonEmptyNavigator.methodMissing(NonEmptyNaviga >> tor.groovy:568) >> at geb.content.PageContentSupport.methodMissing(PageContentSupp >> ort.groovy:33) >> at geb.Page.methodMissing(Page.groovy:112) >> at geb.Page.init_closure1(Page.groovy:151) >> at geb.Page.init_closure1(Page.groovy) >> at geb.js.DefaultAlertAndConfirmSupport.getJavascriptInterface( >> DefaultAlertAndConfirmSupport.groovy:32) >> at geb.js.DefaultAlertAndConfirmSupport.captureDialog(DefaultAl >> ertAndConfirmSupport.groovy:112) >> at geb.js.DefaultAlertAndConfirmSupport.captureAlert(DefaultAle >> rtAndConfirmSupport.groovy:138) >> at geb.js.DefaultAlertAndConfirmSupport.withAlert(DefaultAlertA >> ndConfirmSupport.groovy:146) >> at geb.Page.withAlert(Page.groovy:130) >> at geb.Browser.methodMissing(Browser.groovy:209) >> at geb.spock.GebSpec.methodMissing(GebSpec.groovy:56) >> ... 1 more >> >> Is there anything that I'm missing to get this to work? >> >> Thanks, >> Dustin >> >> -- >> 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 post to this group, send email to [email protected]. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/geb-user/82daea87-8c13-41ca-96f6-3682e6232c78%40googlegroups.com >> <https://groups.google.com/d/msgid/geb-user/82daea87-8c13-41ca-96f6-3682e6232c78%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/CA%2B52dQTfN0oM9%2BNMtvn1-bz6cTT-NTTCB1oaXt4fGwvys3nEww%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
