this is the code.  This is files downloader program.

I read bunch of urls from a file which i want to download. then i loop 
through the links and visit the link and click on download button. the 
waituntilfiledownloads function checks the downloads folder and sees if 
there are any active crdownload files which means the file is currently 
downloading so it pauses. 

I am receiving error of this 
nature. 
https://stackoverflow.com/questions/48450594/selenium-timed-out-receiving-message-from-renderer


@Integration
class DownloadSpec extends GebSpec {

    def setup() {


    }

    def cleanup() {
    }



    private void waitUntilFileDownloads(){
        def complete = false


        def dh = new File('C:\\Users\\User\\Downloads')


        while(!complete){

            def downloading = []

            dh.eachFile {

                if(it.toString().contains("crdownload")){

                    downloading.add(it)

                }

            }

            if(downloading.size() == 0){
                complete = true
            }else{
                Thread.sleep(10000)
            }

        }
    }

    void "download vimm"() {
        when:"The home page is visited"

        def list = new File("games.txt").readLines()


        for(url in list){

                go url
                println "Downloading " + url


                    $("#download_form > button").click()
                    Thread.sleep(2000)
                    waitUntilFileDownloads()
           

        }


        then:"The title is correct"
            println "Completed!"
    }
}



On Thursday, June 22, 2023 at 1:59:06 PM UTC+5:45 [email protected] 
wrote:

> A complete, minimal reproducer would be helpful. Please also share the
> full stack trace of your error. Thank you.
> --
> Alexander Kriegisch
> https://scrum-master.de
>
>
> Sanjay Giri schrieb am 22.06.2023 um 09:42:
> > thank you very much. Few times i am receiving 
> > 
> > timed out receiving message from renderer 300.000 
> > 
> > error. 
> > 
> > do you know what is causing this and how to overcome it?
> > 
> > In the setup i have put
> > 
> > 
> > def setup() {
> > 
> > driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);
> > 
> > 
> > }
> > 
> > but it doesnt seem to work. 
> > 
> > On Thursday, June 22, 2023 at 1:03:28 PM UTC+5:45 [email protected]
> > wrote:
> > 
> > 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 <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/
> > <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>
>  
> <
> https://groups.google.com/d/msgid/geb-user/3b9b548a-4508-4ee0-94c0-cdc1c63a0cd0n%40googlegroups.com?utm_medium=email&utm_source=footer
>  
> <
> 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]
> > <mailto:[email protected]>.
> > To view this discussion on the web visit
> > 
> https://groups.google.com/d/msgid/geb-user/9bbd5b3e-6339-4ebf-a36f-e5fdc69915f1n%40googlegroups.com
>  
> <
> https://groups.google.com/d/msgid/geb-user/9bbd5b3e-6339-4ebf-a36f-e5fdc69915f1n%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/1a73a51c-d021-45aa-97bf-11cff20d4b49n%40googlegroups.com.

Reply via email to