public object ExecuteScript(string javascript, Scope scope) { var stripReturn = Regex.Replace(javascript, @"^\s*return ", ""); var retval = GetWindowScope(scope).Eval(stripReturn); Watin.WaitForComplete(); return(retval); }
public string ExecuteScript(string javascript, Scope scope) { // TODO: scope is the current window in which to accept a dialog var stripReturn = Regex.Replace(javascript, @"^\s*return ", ""); var retval = Watin.Eval(stripReturn); Watin.WaitForComplete(); return(retval); }
public object ExecuteScript(string javascript, Scope scope, params object[] args) { if (args.Length > 0) { throw new NotSupportedException("WatiN does not support the passing of arguments to JavaScript."); } var stripReturn = Regex.Replace(javascript, @"^\s*return ", ""); var retval = GetWindowScope(scope).Eval(stripReturn); Watin.WaitForComplete(); return(retval); }