-
Notifications
You must be signed in to change notification settings - Fork 763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add 'Wait Until Page Loaded' keyword #107
Comments
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, On Sep 10, 2012, at 23:48, know1nos notifications@github.com wrote:
|
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. |
Closed because of inactivity. If someone encounters similar or same problem please open a new issue. |
@aaltat please consider this scenario Open Browser chrome http://url_with_some_very_slow_blocking_javascript 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 |
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. |
@aaltat agree to your point and also to the fact that this is not so easy to implement. |
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. |
This is a useful keyword in the original SeleniumLibrary, is it possible to add it to the Selenium2Library?
The text was updated successfully, but these errors were encountered: