Preetha Rao
Preetha Rao

Reputation: 13

Does Selenium's waitForpageToLoad function always wait the full time?

Does waitForPageToLoad wait for the full time specified or return sooner if the page gets loaded?

For example:

$this->waitForPageToLoad("6000");

Does this load after 6 seconds always, or sooner if the page loads in 1 second?

Upvotes: 0

Views: 1404

Answers (3)

Sankumarsingh
Sankumarsingh

Reputation: 10099

The argument you are passing, is the maximum time duration as per your expectation. If the page is loaded before it, it returns back to execute next command. if not then it will show the error msg

Upvotes: 0

AutomatedTester
AutomatedTester

Reputation: 22438

It should return before that time if the page is loaded.

Upvotes: 1

Lee Kowalkowski
Lee Kowalkowski

Reputation: 11751

It returns sooner. The argument is a timeout, a period after which to abort waiting for the page to load.

Upvotes: 2

Related Questions