Below is the Piece of code:

     def clickAndEndSection() {
                waitFor { 
    //Cover and endSectionButton are  elements
                    cover.displayed == false
                    endSectionButton.displayed
                    clickHammer(endSectionButton)
                }
                doThink()
                endSectionWithConfirmation()
            }

            def endSection(checkElement = null) {
                waitFor { 
                    cover.displayed == false
                    backdrop.displayed
                    continueButton.displayed
                }
                doThink(5)
                checkElement = checkElement == null ? backdrop : checkElement
                waitFor {
                    clickHammer(continueButton, checkElement)
                }
            }
def endSectionWithConfirmation() {
        endSection(endSectionConfirmationOverlay)
        waitFor {
            endSectionConfirmationModal.displayed
        }
        doThink()
        endSectionOkButton.()
    }

Am getting an like
org.codehaus.groovy.runtime.powerassert.PowerAssertionError

Below is the log trace:

geb.waiting.: condition did not pass in 10.0 seconds (failed with exception)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_162]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_162]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_162]
    at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_162]
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:263) ~[groovy-all-2.4.13.jar:2.4.13]
    at geb.waiting.Wait.waitFor(Wait.groovy:138) ~[?:?]
    at geb.waiting.Wait$waitFor.call(Unknown Source) ~[?:?]
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) ~[groovy-all-2.4.13.jar:2.4.13]
    at geb.waiting.Wait$waitFor.call(Unknown Source) ~[?:?]
    at geb.waiting.DefaultWaitingSupport.doWaitFor(DefaultWaitingSupport.groovy:51) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor1338.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:64) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182) ~[groovy-all-2.4.13.jar:2.4.13]
    at geb.waiting.DefaultWaitingSupport.waitFor(DefaultWaitingSupport.groovy:38) ~[?:?]
    at geb.waiting.WaitingSupport$waitFor$0.call(Unknown Source) ~[?:?]
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) ~[groovy-all-2.4.13.jar:2.4.13]
    at geb.waiting.WaitingSupport$waitFor$0.call(Unknown Source) ~[?:?]
    at geb.Page.waitFor(Page.groovy:535) ~[?:?]
    at geb.Page.waitFor(Page.groovy) ~[?:?]
    at geb.waiting.WaitingSupport$waitFor.callCurrent(Unknown Source) ~[?:?]
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166) ~[groovy-all-2.4.13.jar:2.4.13]
    at ActPage.endSectionWithConfirmation(Script17.groovy:173) ~[?:?]
    at ActPage.clickAndEndSection(Script17.groovy:155) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:925) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:908) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:168) ~[groovy-all-2.4.13.jar:2.4.13]
    at geb.Browser.methodMissing(Browser.groovy:209) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:939) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1262) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:810) ~[groovy-all-2.4.13.jar:2.4.13]
    at geb.Browser.invokeMethod(Browser.groovy) ~[?:?]
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:446) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:369) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:158) ~[groovy-all-2.4.13.jar:2.4.13]
    at Script17$_run_closure1.doCall(Script17.groovy:236) ~[?:?]
    at Script17$_run_closure1.doCall(Script17.groovy) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) ~[groovy-all-2.4.13.jar:2.4.13]
    at geb.Browser.drive(Browser.groovy:1058) ~[?:?]
    at geb.Browser$drive$0.callStatic(Unknown Source) ~[?:?]
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:214) ~[groovy-all-2.4.13.jar:2.4.13]
    at geb.Browser.drive(Browser.groovy:1048) ~[?:?]
    at geb.Browser$drive.call(Unknown Source) ~[?:?]
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) ~[groovy-all-2.4.13.jar:2.4.13]
    at Script17.run(Script17.groovy:189) ~[?:?]
    at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:72) ~[groovy-all-2.4.13.jar:2.4.13]
    at javax.script.CompiledScript.eval(Unknown Source) ~[?:1.8.0_162]
    at org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:221) ~[ApacheJMeter_core.jar:4.0 r1823414]
    at org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sampler.java:69) ~[ApacheJMeter_java.jar:4.0 r1823414]
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490) ~[ApacheJMeter_core.jar:4.0 r1823414]
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416) ~[ApacheJMeter_core.jar:4.0 r1823414]
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250) ~[ApacheJMeter_core.jar:4.0 r1823414]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_162]
Caused by: org.codehaus.groovy.runtime.powerassert.PowerAssertionError: endSectionConfirmationModal.displayed
|                           |
|                           false
ActPage -> endSectionConfirmationModal: geb.navigator.NonEmptyNavigator
    at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:404) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:650) ~[groovy-all-2.4.13.jar:2.4.13]
    at ActPage$_endSectionWithConfirmation_closure11.doCall(Script17.groovy:174) ~[?:?]
    at ActPage$_endSectionWithConfirmation_closure11.doCall(Script17.groovy) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) ~[groovy-all-2.4.13.jar:2.4.13]
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) ~[groovy-all-2.4.13.jar:2.4.13]
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) ~[groovy-all-2.4.13.jar:2.4.13]
    at geb.waiting.Wait.waitFor(Wait.groovy:127) ~[?:?]
    ... 88 more



Source link https://sqa.stackexchange.com/questions/35442/-to-click-a-next--and--a-waittimeoutexception-and--ass

LEAVE A REPLY

Please enter your comment!
Please enter your name here