com.opera.core.systems.util
Class CapabilitiesSanitizer
java.lang.Object
com.opera.core.systems.util.CapabilitiesSanitizer
public class CapabilitiesSanitizer
- extends java.lang.Object
Sanitizes the values of the capabilities object provided according to the rules defined in the
IntegerCapabilities.
If connecting to RemoteWebDriver from a language without support for proper integers (such as
Ruby and Python), we must convert the longs (produced by the Integer class or #to_i method in
Ruby) to integers.
WARNING: Since Java's Long can't be casted into Integer, we need to ask java.lang.Long for the
integer value of its value. This will perform a narrowing conversion simply discarding the
lowest bits that don't fit into the Integer type.
- Author:
- Andreas Tolf Tolfsen
|
Method Summary |
static org.openqa.selenium.Capabilities |
sanitize(org.openqa.selenium.Capabilities capabilities)
Performs the sanitization of the capabilities object, returning the same capabilities object
with nice values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CapabilitiesSanitizer
public CapabilitiesSanitizer()
sanitize
public static org.openqa.selenium.Capabilities sanitize(org.openqa.selenium.Capabilities capabilities)
- Performs the sanitization of the capabilities object, returning the same capabilities object
with nice values.
- Returns:
- a capabilities object that is safe to use
Copyright © 2011. All Rights Reserved.