MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / ExecuteCustomDriverCommand

Method ExecuteCustomDriverCommand

dotnet/src/webdriver/WebDriver.cs:462–470  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

ExecuteMethod · 0.95
FormatMethod · 0.80

Tested by

no test coverage detected