Question

I am getting the following exception

    geb.waiting.WaitTimeoutException at ApprovalChannelSpec.groovy:40
    Caused by: org.codehaus.groovy.runtime.powerassert.PowerAssertionError at   ApprovalChannelSpec.groovy:40

A more details can be found below: ![1]:http://i.imgur.com/a2mlRil.png

Was it helpful?

Solution

It means that you have a condition that did not happen within the allotted time. In your case it looks like it is waiting for 45 seconds for the invoices link tab to be present, but it never shows up.

The docs for the waitFor method specify this http://www.gebish.org/manual/0.7.0/api/geb-core/geb/waiting/Wait.html#waitFor(groovy.lang.Closure):

Invokes the given block every retryInterval seconds until it returns a true value according to the Groovy Truth. If block does not return a truish value within timeout seconds then a WaitTimeoutException will be thrown. If the given block is executing at the time when the timeout is reached, it will not be interrupted. This means that this method may take longer than the specified timeout. For example, if the block takes 5 seconds to complete but the timeout is 2 seconds, the wait is always going to take at least 5 seconds.

If block throws any Throwable, it is treated as a failure and the block will be tried again after the retryInterval has expired. If the last invocation of block throws an exception it will be the cause of the WaitTimeoutException that will be thrown.

OTHER TIPS

You need use waitFor

Look this docs: waiting

p.s. Yes, @jeff-story right.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top