InternalExecute() private method

Executes commands with the driver
private InternalExecute ( DriverCommand driverCommandToExecute, object>.Dictionary parameters ) : OpenQA.Selenium.Remote.Response
driverCommandToExecute DriverCommand Command that needs executing
parameters object>.Dictionary Parameters needed for the command
return OpenQA.Selenium.Remote.Response
Ejemplo n.º 1
0
        /// <summary>
        /// Returns local storage value given a key.
        /// </summary>
        /// <param name="key"></param>
        /// <returns>A local storage <see cref="string"/> value given a key, if present, otherwise returns null.</returns>
        public string GetItem(string key)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("key", key);
            Response commandResponse = driver.InternalExecute(DriverCommand.GetLocalStorageItem, parameters);

            if (commandResponse.Value == null)
            {
                return(null);
            }

            return(commandResponse.Value.ToString());
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Executes a command on this element using the specified parameters.
 /// </summary>
 /// <param name="commandToExecute">The <see cref="DriverCommand"/> to execute against this element.</param>
 /// <param name="parameters">A <see cref="Dictionary{K, V}"/> containing names and values of the parameters for the command.</param>
 /// <returns>The <see cref="Response"/> object containing the result of the command execution.</returns>
 protected Response Execute(DriverCommand commandToExecute, Dictionary <string, object> parameters)
 {
     return(driver.InternalExecute(commandToExecute, parameters));
 }