Interface ICustomDriverCommandExecutor
Exposes an interface to allow drivers to register and execute custom commands.
public interface ICustomDriverCommandExecutor
Methods
ExecuteCustomDriverCommand(string, Dictionary<string, object>)
Executes a command with this driver.
object? ExecuteCustomDriverCommand(string driverCommandToExecute, Dictionary<string, object> parameters)
Parameters
driverCommandToExecutestringThe 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.
parametersDictionary<string, object>A Dictionary<TKey, TValue> containing the names and values of the parameters of the command.
Returns
- object
An object that contains the value returned by the command, if any.
Exceptions
- WebDriverException
The command returned an exceptional value.
RegisterCustomDriverCommand(string, CommandInfo?)
Registers a command to be executed with this driver instance.
bool RegisterCustomDriverCommand(string commandName, CommandInfo? commandInfo)
Parameters
commandNamestringThe unique name of the command to register.
commandInfoCommandInfoThe CommandInfo object describing the command.
Returns
RegisterCustomDriverCommands(IReadOnlyDictionary<string, CommandInfo>)
Registers a set of commands to be executed with this driver instance.
void RegisterCustomDriverCommands(IReadOnlyDictionary<string, CommandInfo> commands)
Parameters
commandsIReadOnlyDictionary<string, CommandInfo>An IReadOnlyDictionary<TKey, TValue> where the keys are the names of the commands to register, and the values are the CommandInfo objects describing the commands.