Class DesiredCapabilitiesEx

  • All Implemented Interfaces:
    Serializable, org.openqa.selenium.Capabilities

    public class DesiredCapabilitiesEx
    extends org.openqa.selenium.remote.DesiredCapabilities
    Allows definition of DesiredCapabilities to be chained.
    See Also:
    Serialized Form
    • Constructor Detail

      • DesiredCapabilitiesEx

        public DesiredCapabilitiesEx()
        Begins chaining with no capabilities.
      • DesiredCapabilitiesEx

        public DesiredCapabilitiesEx​(org.openqa.selenium.Capabilities capabilities)
        Begins chaining with specified capabilities.
        Parameters:
        capabilities - the capabilities to chain on
    • Method Detail

      • with

        public DesiredCapabilitiesEx with​(String key)
        Chains a true capability.
        Parameters:
        key - the capability to chain
        Returns:
        chained capabilities, on new set of capabilities
      • with

        public DesiredCapabilitiesEx with​(String key,
                                          Object value)
        Chains a capability.
        Parameters:
        key - the capability to chain
        value - the value; if null, it will be ignored
        Returns:
        chained capabilities, on new set of capabilities
      • withAdded

        public DesiredCapabilitiesEx withAdded​(String key,
                                               Object value)
        Appends on existing capability. If no such capability exists it will be created.
        Parameters:
        key - the capability to append on
        value - value to append
        Returns:
        chained capabilities, on new set of capabilities
        Throws:
        NullPointerException - if capability does not exist