How to auto exit browser when timeout in selenium C#?
<p>I want browser auto exit browser when timeout.</p>

<p>I was debugging it show correct in my mind. But when to run the application, I don't know it does not exit browser after <code>waiting_timeout</code> seconds.</p>

<p>My code like:</p>

<pre><code>int waiting_timeout = 60;
_tmExcute = DateTime.Now;
// Do any thing
if ((DateTime.Now - _tmExcute).TotalSeconds &gt; waiting_timeout)
{
    ExitALL();      // exit browser.
}
</code></pre>