Have you tried evaluating the property from inside GebConfig, overriding the default value if the property is present?
Master Automator schrieb am 02.04.2020 05:03 (GMT +07:00):
>
>
> 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
>> <
alex...@kriegisch.name <target=> > wrote:
>>
>>> Have you tried GebConfig.groovy?
>>>
https://gebish.org/manual/
>>>
>>> --
>>> 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