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

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript