environments {
//prepare phantomJS config
// ......snip
// it is our default
driver = {
def phantomJsDriver = new PhantomJSDriver(phantomCaps)
phantomJsDriver.manage().window().size = new Dimension(1680, 1050)
phantomJsDriver
}
waiting {
timeout = 10
}
'htmlunit' {
//<snip>configure htmlunit
driver = {htmlUnitDriver}
}
'firefox' {
//<snip>configure firefox
driver={new FirefoxDriver(ffCaps)}
}
'chrome' {
//<snip>configure chrome
driver ={ new ChromeDriver(chromeCaps)}
}
'slowServer' {
waiting {
timeout = 30
}
}
}
Now, if I explicitly set 'slowServer' as an environment, using the -Dgeb.env parameter, timeout is changed to 30 seconds as expected.
However, the now-supposedly-default timeout of 10 seconds is not observed and pages time out after 5 seconds.
This happens regardless of selected browser and I don't seem to be able to properly configure it.
What am I doing wrong?
--
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 geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/be531e31-bb92-4362-bf8f-b6162731198b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,
I simply wanted to override default timeout value.
But I figured it out, instead of placing timeout configuration in environments block, I moved it out like this:
(...)
waiting { timeout = 10 }
environments{
defaultDriver={...}
'htmlunit' {...}
'firefox' {...}
'slow' {waiting { timeout = 30 }}
Now the timeout value is as expected.
As for atCheckWaiting: I am not setting it due to more complex at checks necessary, but I do use waitFor{} within at block.
As I understood, whole at checker is wrapped with atCheckWaiting, and some of the pages are loaded dynamically, so I need to verify presence of several items to confirm page is properly loaded.
Unless I'm wrong and all statements in at block get their own waitFor?