|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Platform>
org.openqa.selenium.Platform
public enum Platform
Represents the known and supported Platforms that WebDriver runs on. This is pretty close to the Operating System, but differs slightly, because this class is used to extract information such as program locations and line endings.
Enum Constant Summary | |
---|---|
ANDROID
|
|
ANY
Never returned, but can be used to request a browser running on any operating system. |
|
LINUX
|
|
MAC
|
|
UNIX
Many platforms have UNIX traits, amongst them LINUX, Solaris and BSD. |
|
VISTA
For versions of Windows that "feel like" Windows Vista. |
|
WINDOWS
Never returned, but can be used to request a browser running on any version of Windows. |
|
XP
For versions of Windows that "feel like" Windows XP. |
Method Summary | |
---|---|
static Platform |
extractFromSysProperty(String osName)
Extracts platforms based on system properties in Java and a heuristic to determine the most likely operating system. |
static Platform |
getCurrent()
Get current platform (not necessarily the same as operating system). |
int |
getMajorVersion()
Returns the major version of this platform. |
int |
getMinorVersion()
Returns the minor version of this platform. |
String[] |
getPartOfOsName()
|
boolean |
is(Platform compareWith)
Heuristic for comparing two platforms. |
static Platform |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Platform[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Platform WINDOWS
public static final Platform XP
public static final Platform VISTA
public static final Platform MAC
public static final Platform UNIX
public static final Platform LINUX
public static final Platform ANDROID
public static final Platform ANY
Method Detail |
---|
public static Platform[] values()
for (Platform c : Platform.values()) System.out.println(c);
public static Platform valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic String[] getPartOfOsName()
public static Platform getCurrent()
public static Platform extractFromSysProperty(String osName)
osName
- the operating system name to determine the platform of
public boolean is(Platform compareWith)
compareWith
- the platform to compare with
public int getMajorVersion()
public int getMinorVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |