Class CommandInfoRepository
Holds the information about all commands specified by the JSON wire protocol. This class cannot be inherited, as it is intended to be a singleton, and allowing subclasses introduces the possibility of multiple instances.
public abstract class CommandInfoRepository
- Inheritance
-
CommandInfoRepository
- Derived
- Inherited Members
Constructors
CommandInfoRepository()
Initializes a new instance of the CommandInfoRepository class. Protected accessibility prevents a default instance from being created.
protected CommandInfoRepository()
Properties
SpecificationLevel
Gets the level of the W3C WebDriver specification that this repository supports.
public abstract int SpecificationLevel { get; }
Property Value
Methods
GetCommandInfo(string)
Gets the CommandInfo for a DriverCommand.
public CommandInfo GetCommandInfo(string commandName)
Parameters
commandName
stringThe DriverCommand for which to get the information.
Returns
- CommandInfo
The CommandInfo for the specified command.
InitializeCommandDictionary()
Initializes the dictionary of commands for the CommandInfoRepository
protected abstract void InitializeCommandDictionary()
TryAddCommand(string, CommandInfo)
Tries to add a command to the list of known commands.
public bool TryAddCommand(string commandName, CommandInfo commandInfo)
Parameters
commandName
stringName of the command.
commandInfo
CommandInfoThe command information.
Returns
Remarks
This method is used by WebDriver implementations to add additional custom driver-specific commands. This method will not overwrite existing commands for a specific name, and will return false in that case.