I have not tried, but it could be something like:
driver = {
ChromeOptions o = new ChromeOptions()
o.addArguments('headless')
def chromeDriver = new ChromeDriver(o)
chromeDriver.manage().timeouts().pageLoadTimeout(2, TimeUnit.MINUTES)
chromeDriver
}
Marcin will correct me, if necessary. π
--
Alexander Kriegisch
https://scrum-master.de
Sanjay Giri schrieb am 22.06.2023 um 08:53:
> hello everyone,
>
> From this link
>
> https://www.selenium.dev/documentation/webdriver/drivers/options/
>
> under Page Load Timeout it says the default wait is 300000.
>
> I wanted to change the page load timeout to just 2 minutes. how can i
> make this change?
>
> I am using GEB in grails 4 as functional test.
>
> This is my GebConfig.groovy
>
> import org.openqa.selenium.chrome.ChromeDriver
> import org.openqa.selenium.chrome.ChromeOptions
> import org.openqa.selenium.firefox.FirefoxDriver
>
> environments {
>
> // run via β./gradlew -Dgeb.env=chrome iTβ
> chrome {
> driver = {
>
> System.setProperty('webdriver.chrome.driver',
> 'C:\\webdrivers\\chromedriver.exe')
> new ChromeDriver()
> }
>
> }
>
> // run via β./gradlew -Dgeb.env=chromeHeadless iTβ
> chromeHeadless {
> driver = {
> ChromeOptions o = new ChromeOptions()
>
> o.addArguments('headless')
> new ChromeDriver(o)
> }
> }
>
> // run via β./gradlew -Dgeb.env=firefox iTβ
> firefox {
> driver = { new FirefoxDriver() }
> }
> }
>
>
> I appreciate any help! Thanks!
>
> --
> 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]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/geb-user/3b9b548a-4508-4ee0-94c0-cdc1c63a0cd0n%40googlegroups.com
>
> <https://groups.google.com/d/msgid/geb-user/3b9b548a-4508-4ee0-94c0-cdc1c63a0cd0n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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/a4ec4560-150e-b8a7-8874-f5020bfac2ea%40Kriegisch.name.