/// <summary> /// Refreshes the current page. /// </summary> public void Refresh() { if (NgDriver.IgnoreSynchronization) { WrappedNavigation.Refresh(); } else { var url = NgDriver.ExecuteScript("return window.location.href;") as string; NgDriver.Url = url; } }
/// <summary> /// Evaluates the expression as if it were on the scope of the current element. /// </summary> /// <param name="expression">The expression to evaluate.</param> /// <returns>The expression evaluated by Angular.</returns> public object Evaluate(string expression) { NgDriver.WaitForAngular(); return(NgDriver.ExecuteScript(ClientSideScripts.Evaluate, WrappedElement, expression)); }
/// <summary>Easy use for java scripts.</summary> /// <example>Sample use of java scripts: <code> /// ExecuteCustomJavaScript("return document.getElementById("demo").innerHTML"); /// </code></example> /// <returns>An IJavaScriptExecutor Handle.</returns> public IJavaScriptExecutor ExecuteCustomJavaScript(string script) { return((IJavaScriptExecutor)NgDriver.ExecuteScript(script)); }