Cypress.io - function visit takes a long time, it is waiting until all resources are loadedGoogle Chrome Extension - waiting until page loadsChrome Developer Tools: How to Read the Network Panel?Web resources waiting a long time in chromePuppeteer wait for all images to load then take screenshotWaiting time until finishedLogin through a web gateway with Cypress is timing outHow to force reload only some sources in Chrome/Firefoxcypress.io - wait for an lazy loaded js-fileHow to wait for pages with long load time to load in testcafe?Cypress.io - Waiting Too Long for Pages to Finish Loading

Why do my bicycle brakes get worse and feel more 'squishy" over time?

Unconventional examples of mathematical modelling

Go to last file in vim

Sum Square Difference, which way is more Pythonic?

How can I shoot a bow using Strength instead of Dexterity?

Locked room poison mystery!

How to measure if Scrum Master is making a difference and when to give up

What's a good pattern to calculate a variable only when it is used the first time?

Are there liquid fueled rocket boosters having coaxial fuel/oxidizer tanks?

What should I do if actually I found a serious flaw in someone's PhD thesis and an article derived from that PhD thesis?

A+ rating still unsecure by Google Chrome's opinion

Why aren't rockets built with truss structures inside their fuel & oxidizer tanks to increase structural strength?

Is there any official ruling on how characters go from 0th to 1st level in a class?

When did Bilbo and Frodo learn that Gandalf was a Maia?

Would the USA be eligible to join the European Union?

A man in the desert is bitten by a skeletal animal, its skull gets stuck on his arm

How would armour (and combat) change if the fighter didn't need to actually wear it?

Does the C++ standard guarantee that a failed insertion into an associative container will not modify the rvalue-reference argument?

Scam? Phone call from "Department of Social Security" asking me to call back

Can anybody tell me who this Pokemon is?

Weird resistor with dots around it on the schematic

How do I ask for 2-3 days per week remote work in a job interview?

If a person claims to know anything could it be disproven by saying 'prove that we are not in a simulation'?

What are the advantages of this gold finger shape?



Cypress.io - function visit takes a long time, it is waiting until all resources are loaded


Google Chrome Extension - waiting until page loadsChrome Developer Tools: How to Read the Network Panel?Web resources waiting a long time in chromePuppeteer wait for all images to load then take screenshotWaiting time until finishedLogin through a web gateway with Cypress is timing outHow to force reload only some sources in Chrome/Firefoxcypress.io - wait for an lazy loaded js-fileHow to wait for pages with long load time to load in testcafe?Cypress.io - Waiting Too Long for Pages to Finish Loading






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I am using a Cypress.io for end to end testing in our team, but we have a problem with function cy.visit() very often.



The website has many resources from our server (css files, js files,....) and some external resources (js files).
If you open our website, sometimes it happens that external js file is pending (browser is waiting).



Cypress during the execution of cy.visit() is probably waiting until all resources are loaded. And this is a problem. I dont need to wait for all resources, because for example this external js is for an advert and it is not important for our test.



Can i tell to Cypress something like: "After a few seconds after start loading a page you can exec this test without all resources loaded"?



I have tried onBeforeLoad combine with setTimeout and reload, but it failed :(



cy.visit('https://www.example.org', 
onBeforeLoad: (win) =>
setTimeout(function() cy.reload(); , 10000);

)


I am so crazy a I dont know what do next. Please help me and sorry for my english :) Thank you! :)










share|improve this question






























    3















    I am using a Cypress.io for end to end testing in our team, but we have a problem with function cy.visit() very often.



    The website has many resources from our server (css files, js files,....) and some external resources (js files).
    If you open our website, sometimes it happens that external js file is pending (browser is waiting).



    Cypress during the execution of cy.visit() is probably waiting until all resources are loaded. And this is a problem. I dont need to wait for all resources, because for example this external js is for an advert and it is not important for our test.



    Can i tell to Cypress something like: "After a few seconds after start loading a page you can exec this test without all resources loaded"?



    I have tried onBeforeLoad combine with setTimeout and reload, but it failed :(



    cy.visit('https://www.example.org', 
    onBeforeLoad: (win) =>
    setTimeout(function() cy.reload(); , 10000);

    )


    I am so crazy a I dont know what do next. Please help me and sorry for my english :) Thank you! :)










    share|improve this question


























      3












      3








      3








      I am using a Cypress.io for end to end testing in our team, but we have a problem with function cy.visit() very often.



      The website has many resources from our server (css files, js files,....) and some external resources (js files).
      If you open our website, sometimes it happens that external js file is pending (browser is waiting).



      Cypress during the execution of cy.visit() is probably waiting until all resources are loaded. And this is a problem. I dont need to wait for all resources, because for example this external js is for an advert and it is not important for our test.



      Can i tell to Cypress something like: "After a few seconds after start loading a page you can exec this test without all resources loaded"?



      I have tried onBeforeLoad combine with setTimeout and reload, but it failed :(



      cy.visit('https://www.example.org', 
      onBeforeLoad: (win) =>
      setTimeout(function() cy.reload(); , 10000);

      )


      I am so crazy a I dont know what do next. Please help me and sorry for my english :) Thank you! :)










      share|improve this question














      I am using a Cypress.io for end to end testing in our team, but we have a problem with function cy.visit() very often.



      The website has many resources from our server (css files, js files,....) and some external resources (js files).
      If you open our website, sometimes it happens that external js file is pending (browser is waiting).



      Cypress during the execution of cy.visit() is probably waiting until all resources are loaded. And this is a problem. I dont need to wait for all resources, because for example this external js is for an advert and it is not important for our test.



      Can i tell to Cypress something like: "After a few seconds after start loading a page you can exec this test without all resources loaded"?



      I have tried onBeforeLoad combine with setTimeout and reload, but it failed :(



      cy.visit('https://www.example.org', 
      onBeforeLoad: (win) =>
      setTimeout(function() cy.reload(); , 10000);

      )


      I am so crazy a I dont know what do next. Please help me and sorry for my english :) Thank you! :)







      google-chrome e2e-testing cypress






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 27 at 11:53









      Bohumil HavlíčekBohumil Havlíček

      182 bronze badges




      182 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          3














          You can block unnecessary domains from loading with the blacklistHosts: [] option in your cypress.json. Just add the domain name of the advertiser (and potentially anything else you don't need, like Google Analytics) to the blacklistHosts array:




          // the rest of your cypress.json...
          "blacklistHosts": [
          "cdn.my-advertiser.com"
          ]



          More information about blacklistHosts is available in the docs.






          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55376564%2fcypress-io-function-visit-takes-a-long-time-it-is-waiting-until-all-resources%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            You can block unnecessary domains from loading with the blacklistHosts: [] option in your cypress.json. Just add the domain name of the advertiser (and potentially anything else you don't need, like Google Analytics) to the blacklistHosts array:




            // the rest of your cypress.json...
            "blacklistHosts": [
            "cdn.my-advertiser.com"
            ]



            More information about blacklistHosts is available in the docs.






            share|improve this answer





























              3














              You can block unnecessary domains from loading with the blacklistHosts: [] option in your cypress.json. Just add the domain name of the advertiser (and potentially anything else you don't need, like Google Analytics) to the blacklistHosts array:




              // the rest of your cypress.json...
              "blacklistHosts": [
              "cdn.my-advertiser.com"
              ]



              More information about blacklistHosts is available in the docs.






              share|improve this answer



























                3












                3








                3







                You can block unnecessary domains from loading with the blacklistHosts: [] option in your cypress.json. Just add the domain name of the advertiser (and potentially anything else you don't need, like Google Analytics) to the blacklistHosts array:




                // the rest of your cypress.json...
                "blacklistHosts": [
                "cdn.my-advertiser.com"
                ]



                More information about blacklistHosts is available in the docs.






                share|improve this answer













                You can block unnecessary domains from loading with the blacklistHosts: [] option in your cypress.json. Just add the domain name of the advertiser (and potentially anything else you don't need, like Google Analytics) to the blacklistHosts array:




                // the rest of your cypress.json...
                "blacklistHosts": [
                "cdn.my-advertiser.com"
                ]



                More information about blacklistHosts is available in the docs.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 27 at 14:28









                Zach BloomquistZach Bloomquist

                1,7247 silver badges22 bronze badges




                1,7247 silver badges22 bronze badges





















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid …


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55376564%2fcypress-io-function-visit-takes-a-long-time-it-is-waiting-until-all-resources%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

                    155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

                    Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?