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

Method RegisterDriverCommand

dotnet/src/webdriver/WebDriver.cs:502–515  ·  view source on GitHub ↗

Registers a command to be executed with this driver instance. The unique name of the command to register. The object describing the command. if the registered command is internal to the driver; otherwise .</

(string commandName, [NotNullWhen(true)] CommandInfo? commandInfo, bool isInternalCommand)

Source from the content-addressed store, hash-verified

500 /// <param name="isInternalCommand"><see langword="true"/> if the registered command is internal to the driver; otherwise <see langword="false"/>.</param>
501 /// <returns><see langword="true"/> if the command was registered; otherwise, <see langword="false"/>.</returns>
502 internal bool RegisterDriverCommand(string commandName, [NotNullWhen(true)] CommandInfo? commandInfo, bool isInternalCommand)
503 {
504 if (this.CommandExecutor.TryAddCommand(commandName, commandInfo))
505 {
506 if (isInternalCommand)
507 {
508 this.registeredCommands.Add(commandName);
509 }
510
511 return true;
512 }
513
514 return false;
515 }
516
517 /// <summary>
518 /// Find the element in the response

Callers 3

WebDriverMethod · 0.95

Calls 2

TryAddCommandMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected