Class PhantomJSOptions
Class to manage options specific to PhantomJSDriver
public class PhantomJSOptions
- Inheritance
-
PhantomJSOptions
- Inherited Members
Examples
PhantomJSOptions options = new PhantomJSOptions();
For use with PhantomJSDriver:
PhantomJSDriver driver = new PhantomJSDriver(options);
For use with RemoteWebDriver:
RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities());
Constructors
PhantomJSOptions()
public PhantomJSOptions()
Methods
AddAdditionalCapability(string, object)
Provides a means to add additional capabilities not yet added as type safe options for the PhantomJS driver.
public void AddAdditionalCapability(string capabilityName, object capabilityValue)
Parameters
capabilityName
stringThe name of the capability to add.
capabilityValue
objectThe value of the capability to add.
Remarks
Calling AddAdditionalCapability(string, object) where capabilityName
has already been added will overwrite the existing value with the new value in capabilityValue
Exceptions
- ArgumentException
thrown when attempting to add a capability for which there is already a type safe option, or when
capabilityName
is null or the empty string.
ToCapabilities()
Returns DesiredCapabilities for PhantomJS with these options included as capabilities. This copies the options. Further changes will not be reflected in the returned capabilities.
public ICapabilities ToCapabilities()
Returns
- ICapabilities
The DesiredCapabilities for PhantomJS with these options.