Esempio n. 1
0
        public object ExecuteScript(string javascript, Scope scope)
        {
            var stripReturn = Regex.Replace(javascript, @"^\s*return ", "");
            var retval      = GetWindowScope(scope).Eval(stripReturn);

            Watin.WaitForComplete();
            return(retval);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }