Can anyone explain me why those spaces (marked with ?) are there? They are delaying the page loading. I thought it could be the page/script parsing time, but ~350ms looks too much for a simple page; Okay, there're lots of script, but it still looks to much.
What can it be?
Clear your browser's cache and cookies and restart your web browser. Try a different web browser. This is often due to ad-blockers or other extensions in your browser that might prevent viewing our content. Try turning these off and see if the content loads.
To make the browser wait to display the page until it's fully loaded with JavaScript, we run our code in the window. onload method. to set the body element to have opacity 0 initially. window.
Window stop() The stop() method stops window loading. The stop() method is the same as clicking stop in the browser.
Hi @Hazem, You can use “Find Element” or “Element Exists” or “On Element Appear” activity with appropriate value in TimeoutMS property. This will happen by default with web UI Automation activities that have WAIT_FOR_READY = Complete . They will execute only after the web page has been fully loaded.
My guess is that it is a JavaScript loading issue. You should be deffering loading of JavaScript using a defer attribute. This will allow the page to load before it will execute the JavaScript code.
This is because browsers are single threaded and when they encounter a script tag, they halt any other processes until they download and parse the script. By including scripts at the end, you allow the browser to download and render all page elements, style sheets and images without any unnecessary delay. Also, if the browser renders the page before executing any script, you know that all page elements are already available to retrieve.
See http://www.hunlock.com/blogs/Deferred_Javascript and http://blog.fedecarg.com/2011/07/12/javascript-asynchronous-script-loading-and-lazy-loading/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With