private static void WaitUnitJavascriptTrue(RemoteWebDriver driver, string javascript)
 {
     Func<IWebDriver, bool> condition = delegate
                                            {
                                                var scriptResult = driver.ExecuteScript(javascript);
                                                var isScriptActive = (bool)scriptResult;
                                                return isScriptActive;
                                            };
     driver.Wait().Until(condition);
 }