How to reduce substantial lag Selenium Webdriver (C#) when executing on a Siebel Application?
<p>I'll preface this by saying that I'm looking for a solution to the slow performance, not an alternative to Webdriver.  Unfortunately, that is not an option.</p>

<p>In short, the Siebel application takes a <em>very</em> long time to load.  When manually logging in, it takes around 5 seconds to get authenticated and just a few seconds when navigating through pages.  When running automation, it takes 1-2 minutes to log in and 10-20 seconds to navigate.</p>

<p>I'm not entirely constrained to a specific browser / version.  I've had the most success with Chrome and Firefox.  </p>

<p>Is there any sort of way to speed this up?  Maybe something I can change with my driver settings, browser settings, libraries I can utilize, etc.?</p>

<p>Thanks,</p>

<p>Steven</p>

<p>Update: this is the wait script I'm <code>public static void WaitForPageToLoad()
        {
            bool pageComplete = false;
            try
            {
                do
                {
                    pageComplete = (bool)((IJavaScriptExecutor)TestBase.Driver).ExecuteScript("return document.readyState").Equals("complete");
                } while (!pageComplete);
            }
            catch (Exception e)
            {
                System.Console.WriteLine("Page never loaded");
                System.Console.WriteLine("Exception detail: " + e);
            }
        }
    }</code></p>