Package dev.aherscu.qa.jgiven.webdriver
Class WebDriverConfiguration
- java.lang.Object
-
- dev.aherscu.qa.testing.utils.config.AbstractConfiguration<org.apache.commons.configuration.CompositeConfiguration>
-
- dev.aherscu.qa.testing.utils.config.BaseConfiguration
-
- dev.aherscu.qa.jgiven.webdriver.WebDriverConfiguration
-
-
Constructor Summary
Constructors Constructor Description WebDriverConfiguration(org.apache.commons.configuration.Configuration... configurations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description dev.aherscu.qa.jgiven.commons.utils.DesiredCapabilitiesEx
capabilities()
dev.aherscu.qa.jgiven.commons.utils.DesiredCapabilitiesEx
capabilities(dev.aherscu.qa.jgiven.webdriver.WebDriverConfiguration.DeviceType deviceType)
dev.aherscu.qa.jgiven.commons.utils.DesiredCapabilitiesEx
capabilitiesFor(String prefix)
dev.aherscu.qa.jgiven.webdriver.WebDriverConfiguration.DeviceType
deviceType()
String
provider()
List<dev.aherscu.qa.jgiven.commons.utils.DesiredCapabilitiesEx>
requiredCapabilities()
List<dev.aherscu.qa.jgiven.commons.utils.DesiredCapabilitiesEx>
requiredCapabilities(dev.aherscu.qa.jgiven.webdriver.WebDriverConfiguration.DeviceType deviceType)
-
Methods inherited from class dev.aherscu.qa.testing.utils.config.BaseConfiguration
groupsOf, toString, toString
-
Methods inherited from class dev.aherscu.qa.testing.utils.config.AbstractConfiguration
addProperty, clear, clearProperty, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, defaultConfiguration, entrySet, forEach, get, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getKeys, getKeys, getList, getList, getLong, getLong, getLong, getOrDefault, getProperties, getProperty, getShort, getShort, getShort, getString, getString, getStringArray, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, resolve, setProperty, size, stringResourceFrom, subset, values
-
-
-
-
Constructor Detail
-
WebDriverConfiguration
public WebDriverConfiguration(org.apache.commons.configuration.Configuration... configurations)
- Parameters:
configurations
- set of configurations to be aggregated; the `device.type` property has a filtering effect on results ofrequiredCapabilities()
and ofcapabilities()
methods, hence these methods will work correctly only if all instances are created with same `device.type`, or otherwiseresetNextRequiredCapabilitiesIndex()
is called in between
-
-
Method Detail
-
capabilities
public dev.aherscu.qa.jgiven.commons.utils.DesiredCapabilitiesEx capabilities(dev.aherscu.qa.jgiven.webdriver.WebDriverConfiguration.DeviceType deviceType)
- Parameters:
deviceType
- a specific device type- Returns:
- matching capabilities for configured
provider()
and specified device type
-
capabilities
public dev.aherscu.qa.jgiven.commons.utils.DesiredCapabilitiesEx capabilities()
- Returns:
- capabilities for configured
provider()
anddeviceType()
;if
deviceType()
is not blank then retrieves only matching capabilities fromrequired-capabilities.properties
;if no matching capabilities found, then returns whatever is defined in
webdriver.properties
for currentprovider()
-
capabilitiesFor
public dev.aherscu.qa.jgiven.commons.utils.DesiredCapabilitiesEx capabilitiesFor(String prefix)
- Parameters:
prefix
- prefix- Returns:
- capabilities for specified prefix; also adds
<thread-name>:<current-time-millis>
to retrieved capabilities
-
deviceType
public dev.aherscu.qa.jgiven.webdriver.WebDriverConfiguration.DeviceType deviceType()
- Returns:
- the `device.type` as specified in source configuration, or
Platform.ANY
if none specified
-
provider
public String provider()
- Returns:
- the `provider` as specified source configuration
-
requiredCapabilities
public List<dev.aherscu.qa.jgiven.commons.utils.DesiredCapabilitiesEx> requiredCapabilities(dev.aherscu.qa.jgiven.webdriver.WebDriverConfiguration.DeviceType deviceType)
- Parameters:
deviceType
- device type to filter by- Returns:
- all matching device capabilities, if any
-
requiredCapabilities
public List<dev.aherscu.qa.jgiven.commons.utils.DesiredCapabilitiesEx> requiredCapabilities()
- Returns:
- device capabilities per configuration
-
-