ConvertArgumentsToJavaScriptObjects() private static method

private static ConvertArgumentsToJavaScriptObjects ( object args ) : object[]
args object
return object[]
Exemplo n.º 1
0
        protected object ExecuteScriptCommand(string script, string commandName, params object[] args)
        {
            object[] array = RemoteWebDriver.ConvertArgumentsToJavaScriptObjects(args);
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            dictionary.Add("script", script);
            if (array != null && array.Length > 0)
            {
                dictionary.Add("args", array);
            }
            else
            {
                dictionary.Add("args", new object[0]);
            }
            Response response = this.Execute(commandName, dictionary);

            return(this.ParseJavaScriptReturnValue(response.Value));
        }