a wait that stops the test till nothing is happening in the web page anymore
<p>I am using <em>Java</em> and <em>Selenium</em> to write a test. Many times in my test i have to wait till the page or some part of it loads something. I want to wait till the load is finished. I found these two:</p>

<pre><code>1) pageLoadTimeout
2) setScriptTimeout
</code></pre>

<p>But I don't know the exact difference between them or even if they are what I need.
The document says:</p>

<p><code>setScriptTimeout: Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error. If the timeout is negative, then the script will be allowed to run indefinitely.</code> </p>

<p>and</p>

<p><code>pageLoadTimeout: Sets 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.</code></p>

<p>but I don't really get it.</p>

<p>what I need is a wait that stops the test till nothing is happening in the web page anymore.</p>