here's a way to get Selenium to wait while the 'ajaxLoadingIcon' is showing:
private void waitOnAjaxLoading(ISelenium selenium)
{
for (int second = 0; ; second++)
{
if (second >= 60) Assert.Fail("timeout");
try
{
if (!selenium.IsElementPresent("BusyDiv_undefined")) break;
}
catch (Exception)
{ }
Thread.Sleep(1000);
}
}
Comments
Post a Comment