import geb.Page
import geb.navigator.Navigator
abstract class BasePage extends Page implements AngularJsAware{
static def baseurl = "http://localhost:9090"
/***
* Extend Navigator.click() with waitFor { angularReady }
* angularReady is set by /src/main/webapp/angular-test-support.js
*/
BasePage() {
def oldExpand = Navigator.metaClass.getMetaMethod('click', null)
Navigator.metaClass.click = { ->
try {
oldExpand.invoke(delegate)
}
finally {
waitFor { angularReady }
}
}
}
}
Enter code here...AbstractPage() {
println "before meta overwrite "
def oldExpand = Navigator.metaClass.getMetaMethod('click', null)
Navigator.metaClass.click = { ->
Exception ee;
for (int i = 0; i < 3; i++) {
try {
println("test click123")
return (Navigator) oldExpand.invoke(delegate)
} catch (e) {
ee = e
println("sleep 3")
TimeUnit.SECONDS.sleep(3)
throw e
}
}
throw ee
}
}
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-dev/defe649e-9ebd-406c-9100-d8bc8b3aaddf%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Geb Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-dev+u...@googlegroups.com.
To post to this group, send email to geb...@googlegroups.com.