Class DesiredCapabilitiesEx
- java.lang.Object
-
- org.openqa.selenium.MutableCapabilities
-
- org.openqa.selenium.remote.DesiredCapabilities
-
- dev.aherscu.qa.jgiven.commons.utils.DesiredCapabilitiesEx
-
- All Implemented Interfaces:
Serializable
,org.openqa.selenium.Capabilities
public class DesiredCapabilitiesEx extends org.openqa.selenium.remote.DesiredCapabilities
Allows definition ofDesiredCapabilities
to be chained.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DesiredCapabilitiesEx()
Begins chaining with no capabilities.DesiredCapabilitiesEx(org.openqa.selenium.Capabilities capabilities)
Begins chaining with specified capabilities.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DesiredCapabilitiesEx
with(String key)
Chains atrue
capability.DesiredCapabilitiesEx
with(String key, Object value)
Chains a capability.DesiredCapabilitiesEx
with(Stream<Map.Entry<String,Object>> properties)
Chains additional properties to this set of capabilities.DesiredCapabilitiesEx
withAdded(String key, Object value)
Appends on existing capability.-
Methods inherited from class org.openqa.selenium.remote.DesiredCapabilities
acceptInsecureCerts, merge, setAcceptInsecureCerts, setBrowserName, setPlatform, setVersion
-
Methods inherited from class org.openqa.selenium.MutableCapabilities
asMap, equals, getCapability, getCapabilityNames, hashCode, setCapability, setCapability, setCapability, setCapability, toJson, toString
-
-
-
-
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(Stream<Map.Entry<String,Object>> properties)
Chains additional properties to this set of capabilities.- Parameters:
properties
- properties to chain- Returns:
- this set of capabilities
-
with
public DesiredCapabilitiesEx with(String key)
Chains atrue
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 chainvalue
- 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 onvalue
- value to append- Returns:
- chained capabilities, on new set of capabilities
- Throws:
NullPointerException
- if capability does not exist
-
-