Executes a command with this driver. The name of the command to execute. The command name must be registered with the command executor, and must not be a command name known to this driver type. A containing the names and values of the parameters of the command. <returns
(string driverCommandToExecute, Dictionary<string, object?> parameters)
| 460 | /// <returns>A <see cref="Response"/> containing information about the success or failure of the command and any data returned by the command.</returns> |
| 461 | /// <exception cref="WebDriverException">The command returned an exceptional value.</exception> |
| 462 | public object? ExecuteCustomDriverCommand(string driverCommandToExecute, Dictionary<string, object?> parameters) |
| 463 | { |
| 464 | if (this.registeredCommands.Contains(driverCommandToExecute)) |
| 465 | { |
| 466 | throw new WebDriverException(string.Format(CultureInfo.InvariantCulture, "A command named '{0}' is predefined by the driver class and cannot be executed with ExecuteCustomDriverCommand. It should be executed using a named method instead.", driverCommandToExecute)); |
| 467 | } |
| 468 | |
| 469 | return this.Execute(driverCommandToExecute, parameters).Value; |
| 470 | } |
| 471 | |
| 472 | /// <summary> |
| 473 | /// Registers a set of commands to be executed with this driver instance. |