These three timeouts are controlled by the server side of the Selenium equation. Your script, whether it be Java, Python, Ruby, C # or any other, is a client that sends commands to a server that lives in a browser. (There may be an intermediary that sends commands to the browser, for example, Selenium grid. Unfortunately, it is also sometimes called the "server".)
The WebDriver specification that was obtained from Selenium is based on the following values:
For implicit expectations: 0 seconds. This means that if the selenium command does not find the item immediately, it reports immediately, rather than waiting for the item to be found.
To load the page: 300 seconds.
For script timeout: 30 seconds.
(The specification gives values ββin milliseconds. I converted them to seconds for readability.)
Selenium now follows the WebDriver specification.
However, in the past, Selenium used other meanings for them. For example, the Firefox driver used its timeout as follows:
The implicit wait time is set to 0 by default. This means that if the command that finds the elements does not find anything, it will not wait.
The default page load timeout is -1. This means that Selenium will endlessly wait for the page to load.
What Sayfur discovered is different from the wait time for the page to load. This is a timeout between the Selenium client and the Selenium server, which is not well explained on the page found by Sayfur.
The default script timeout is 0. A comment in the source code explains:
The time, in milliseconds, during which a session should wait for asynchronous scripts to complete. If set to 0, the timeout will not fire until the next event loop after the script is executed. This will give scripts that use a 0-based setTimeout to complete.
Thus, even if it is set to zero, the asynchronous script can still be executed, but it must be completed before the Selenium timeout gets a chance to restart.
This is from the code that Selenium uses for Firefox. Other browsers use different code bases, but it is assumed that they behave in a consistent manner, at least with respect to things that match Selenium itself, such as these timeouts. Thus, the meanings and their interpretations should be the same for other browsers.
Louis
source share