Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 7th, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Best way to find out if jqGrid is loaded and ready with Selenium
  2. private readonly string waitScript;
  3.  
  4. waitScript = string.Format(script, jqGridId);
  5.  
  6. public void WaitUntilLoadIconDissappears()
  7. {
  8.     driver.WaitUntil(MAXWAIT, Wait);
  9. }
  10.  
  11. public bool Wait()
  12. {
  13.     var executeScript = ((IJavaScriptExecutor) driver).ExecuteScript(waitScript);
  14.     bool result;
  15.     bool tryParse = bool.TryParse(executeScript.SafeToString(), out result);
  16.     return tryParse && result;
  17. }