Class ReadOnlyDesiredCapabilities
Class to Create the capabilities of the browser you require for IWebDriver. If you wish to use default values use the static methods
public class ReadOnlyDesiredCapabilities : ICapabilities
- Inheritance
-
ReadOnlyDesiredCapabilities
- Implements
- Inherited Members
Properties
AcceptInsecureCerts
Gets or sets a value indicating whether the browser accepts SSL certificates.
public bool AcceptInsecureCerts { get; }
Property Value
BrowserName
Gets the browser name
public string BrowserName { get; }
Property Value
this[string]
Gets the capability value with the specified name.
public object this[string capabilityName] { get; }
Parameters
capabilityName
stringThe name of the capability to get.
Property Value
- object
The value of the capability.
Exceptions
- ArgumentException
The specified capability name is not in the set of capabilities.
Platform
Gets or sets the platform
public Platform Platform { get; }
Property Value
Version
Gets the browser version
public string Version { get; }
Property Value
Methods
Equals(object)
Compare two DesiredCapabilities and will return either true or false
public override bool Equals(object obj)
Parameters
obj
objectDesiredCapabilities you wish to compare
Returns
- bool
true if they are the same or false if they are not
GetCapability(string)
Gets a capability of the browser.
public object GetCapability(string capability)
Parameters
capability
stringThe capability to get.
Returns
- object
An object associated with the capability, or null if the capability is not set on the browser.
GetHashCode()
Return HashCode for the DesiredCapabilities that has been created
public override int GetHashCode()
Returns
- int
Integer of HashCode generated
HasCapability(string)
Gets a value indicating whether the browser has a given capability.
public bool HasCapability(string capability)
Parameters
capability
stringThe capability to get.
Returns
ToDictionary()
Converts the ICapabilities object to a read-only IDictionary<TKey, TValue>.
public IDictionary<string, object> ToDictionary()
Returns
- IDictionary<string, object>
A read-only IDictionary<TKey, TValue> containing the capabilities.
ToString()
Return a string of capabilities being used
public override string ToString()
Returns
- string
String of capabilities being used