You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no need with webdriver. Wait until page load is automatic with webdriver. However it is important to note this doesn't take into account Ajax.
Jeremy is right, Selenium2/WebDriver is a "blocking" API so it will naturally wait until an action (like a page load) is completed. We intentionally pulled that keyword when initially writing the library for that reason.
That said, I would like to hear the context you needed it in @know1nos. I too have run into a special situation where I thought it might be useful and I'm curious if your situation is the same.
There has not been activity for this issue for few years and we are planning to close the old issues if they are not anymore valid ones. If you feel that this is still valid issue, could you send an update. If update is not received in a month, we will assume that this is not anymore an issues and we will close this issue.
As explained in the previous posts, starting from Selenium 2, Selenium provides blocking type of API. This means that Selenium will wait until page is loaded from a browser perspective. But the problem is that browser does not know what JavaScript is doing behind the scenes and therefore browser indicates too early that page loading is done. Also pages sometimes might be build in that way that whole page does not have a single state. Instead different objects in the page have their own load states. Therefore it's impossible to build a keyword which would solve everyone's, or even a small subset, problems in this matter. Instead it's better to talk to the development and find a solution for you that indicates when your page is loaded. Find a thing, which you need to poll to be sure that page is fully loaded. This is usually called testability.
But because this is problem is in the downstream and there is nothing in the SeleniumLibrary side which could be done to solve the problem, I am keeping this issue closed in the foreseen future.
@aaltat i agree with your approch.
if the website works well, there should be no long waiting time on syncronous phase of javascript.
in one of my use case, i need to move on a page in order to make the login, then i need to move to another page with the session token acquired, and i don't care about the content of the "logged user" page. Robot will wait until the "logged user" page is full loaded before move to the new page by the Go To. This is not a robot issue, is a page issue. i never found this behaviour because i never found a very slow website as this one.
@aaltat agree to your point and also to the fact that this is not so easy to implement.
However, when automating Salesforce platform which uses heavy javascript, native salesforce objects, custom objects, lightning/VisualForce pages, pages having multiple dashboard at times - all these components take lot of time to load. Plus the loading time differs a lot. So here is where I felt dire need of this keyword.
Cheers,
With the modern JavaScript Frameworks, there is not anymore single correct way to wait that application is ready. Instead one should look how the application is build and what kind of hook's it offers to ensure that application is ready/loaded.
Also there are already several libraries build on top of the SeleniumLibrary which may already do what you are looking for.
At least SalesForce.org uses Robot Framework and has implemented tooling to support it (e.g. their CumulusCI supports it). They might have something to help with page loading as well.
Activity
j1z0 commentedon Sep 11, 2012
There is no need with webdriver. Wait until page load is automatic with webdriver. However it is important to note this doesn't take into account Ajax.
Cheers,
Jeremy
On Sep 10, 2012, at 23:48, know1nos notifications@github.com wrote:
rtomac commentedon Sep 19, 2012
Jeremy is right, Selenium2/WebDriver is a "blocking" API so it will naturally wait until an action (like a page load) is completed. We intentionally pulled that keyword when initially writing the library for that reason.
That said, I would like to hear the context you needed it in @know1nos. I too have run into a special situation where I thought it might be useful and I'm curious if your situation is the same.
aaltat commentedon Nov 5, 2015
There has not been activity for this issue for few years and we are planning to close the old issues if they are not anymore valid ones. If you feel that this is still valid issue, could you send an update. If update is not received in a month, we will assume that this is not anymore an issues and we will close this issue.
aaltat commentedon Dec 10, 2015
Closed because of inactivity. If someone encounters similar or same problem please open a new issue.
andreabisello commentedon Jun 4, 2018
@aaltat please consider this scenario
Open Browser chrome http://url_with_some_very_slow_blocking_javascript
Go To http://another.url
if the first page has some very slow blocking javascript, it will wait until the download of all of these javascript before moving to page2?
thanks
aaltat commentedon Jun 4, 2018
As explained in the previous posts, starting from Selenium 2, Selenium provides blocking type of API. This means that Selenium will wait until page is loaded from a browser perspective. But the problem is that browser does not know what JavaScript is doing behind the scenes and therefore browser indicates too early that page loading is done. Also pages sometimes might be build in that way that whole page does not have a single state. Instead different objects in the page have their own load states. Therefore it's impossible to build a keyword which would solve everyone's, or even a small subset, problems in this matter. Instead it's better to talk to the development and find a solution for you that indicates when your page is loaded. Find a thing, which you need to poll to be sure that page is fully loaded. This is usually called testability.
But because this is problem is in the downstream and there is nothing in the SeleniumLibrary side which could be done to solve the problem, I am keeping this issue closed in the foreseen future.
andreabisello commentedon Jun 4, 2018
@aaltat i agree with your approch.
if the website works well, there should be no long waiting time on syncronous phase of javascript.
in one of my use case, i need to move on a page in order to make the login, then i need to move to another page with the session token acquired, and i don't care about the content of the "logged user" page. Robot will wait until the "logged user" page is full loaded before move to the new page by the Go To. This is not a robot issue, is a page issue. i never found this behaviour because i never found a very slow website as this one.
vish4444 commentedon Mar 2, 2019
@aaltat agree to your point and also to the fact that this is not so easy to implement.
However, when automating Salesforce platform which uses heavy javascript, native salesforce objects, custom objects, lightning/VisualForce pages, pages having multiple dashboard at times - all these components take lot of time to load. Plus the loading time differs a lot. So here is where I felt dire need of this keyword.
Cheers,
aaltat commentedon Mar 2, 2019
With the modern JavaScript Frameworks, there is not anymore single correct way to wait that application is ready. Instead one should look how the application is build and what kind of hook's it offers to ensure that application is ready/loaded.
Also there are already several libraries build on top of the SeleniumLibrary which may already do what you are looking for.
pekkaklarck commentedon Mar 2, 2019
At least SalesForce.org uses Robot Framework and has implemented tooling to support it (e.g. their CumulusCI supports it). They might have something to help with page loading as well.