Web application automation is depends on so many factors. Browser, network speed ...etc. We should write unquie code for running in all environments. For achieveing that we need to wait for WebElements before performing any operation on that.
Here we will see some built-in waits in WebDriver.
implicitlyWaitImplicit waits are basically your way of telling WebDriver the latency that you want to see if specified web element is not present that WebDriver looking for. (Click here for more information). This will be useful when certain elements on the webpage will not be available immediately and needs some time to load.
pageLoadTimeoutSets the amount of time to wait for a page load to complete before throwing an error. If the timeout is negative, page loads can be indefinite.
Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error.