Thanks Marcin & Alexander. Just to clarify ...
We already have a default value in Geb config:
waiting { timeout = 30 ... }
We can run "gradlew ... specs" and specify a different timeout override
value, say 42 instead of Geb config's default 30 ... like this:
gradlew -DgebNewTimeout=42 --tests someSpec ...
At the moment, the way this is implmeneted, our Configuration Reader class
parses this cmd line timeout value of 42 and then sets the new default
timeout value to 42 using :
browser.getConfig().setDefaultWaitTimeout(<<parsedTimeout>>)
This is done in setupSpec() since the above code line needs the browser
object to get the config.
What are the other ways to get hold of the Geb Config object? Are there any
better ways to do the above?
Thanks,
Kiran
On Tuesday, March 31, 2020 at 7:17:58 AM UTC-7, Marcin Erdmann wrote:
>
> That would be my suggestion as well, to put it in your Geb config script.
>
> On Tue, Mar 31, 2020 at 2:06 PM Alexander Kriegisch <
> [email protected] <javascript:>> wrote:
>
>> Have you tried GebConfig.groovy?
>> https://gebish.org/manual/current/#default-waiting-configuration
>>
>> --
>> Alexander Kriegisch
>> https://scrum-master.de
>>
>>
>> Master Automator schrieb am 31.03.2020 09:13 (GMT +07:00):
>>
>> > In the Gradle command that runs our Geb specs, we pass in the command
>> > line a default timeout for that set of specs.
>> >
>> > Currently, we use this parsed cmd line timeout arg in the setupSpec()
>> > method:
>> >
>> > browser.getConfig().setDefaultWaitTimeout(<<parsedTimeout>>)
>> >
>> > Is there a way to not have to do this in every spec but do it in a
>> > single place if we are ok with the same default timeout for the set of
>> > specs?
>>
>> --
>> 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] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/geb-user/20200331130607.14B4A44C08DF%40dd39516.kasserver.com
>> .
>>
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/geb-user/6e5ecd99-3c9a-4ace-8adf-fb444bf4b8cd%40googlegroups.com.