private static ConvertArgumentsToJavaScriptObjects ( object args ) : object[] | ||
args | object | |
return | object[] |
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)); }