Esempio n. 1
0
 /// <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;
     }
 }
Esempio n. 2
0
 /// <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));
 }
Esempio n. 3
0
 /// <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));
 }