|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.selenium.os.WindowsUtils
public class WindowsUtils
Field Summary | |
---|---|
static Boolean |
regVersion1
|
Constructor Summary | |
---|---|
WindowsUtils()
|
Method Summary | |
---|---|
static void |
deleteRegistryValue(String key)
|
static Class |
discoverRegistryKeyType(String key)
|
static boolean |
doesRegistryValueExist(String key)
|
static String |
findReg()
Finds reg.exe |
static File |
findSystemRoot()
Finds the system root directory, e.g. |
static String |
findTaskKill()
Finds taskkill.exe |
static File |
findWBEM()
Finds the WBEM directory in the systemRoot directory |
static String |
findWMIC()
Finds WMIC.exe |
static String |
getEnvVarIgnoreCase(String var)
|
static String |
getLocalAppDataPath()
Returns the path to Local AppData. |
static com.google.common.collect.ImmutableList<String> |
getPathsInProgramFiles(String childPath)
|
static String |
getProgramFiles86Path()
|
static String |
getProgramFilesPath()
Returns the path to the Windows Program Files. |
static boolean |
isRegExeVersion1()
|
static void |
kill(String[] cmdarray)
Searches the process list for a process with the specified command line and kills it |
static void |
killByName(String name)
Kill processes by name |
static Properties |
loadEnvironment()
Returns the current process environment variables |
static void |
main(String[] args)
|
static Map |
procMap()
Returns a map of process IDs to command lines |
static boolean |
readBooleanRegistryValue(String key)
|
static int |
readIntRegistryValue(String key)
|
static String |
readStringRegistryValue(String key)
|
static boolean |
thisIsWindows()
Returns true if the current OS is MS Windows; false otherwise |
static void |
traceWith(Logger log)
|
static void |
tryToKillByName(String name)
Kill processes by name, log and ignore errors |
static void |
writeBooleanRegistryValue(String key,
boolean data)
|
static void |
writeIntRegistryValue(String key,
int data)
|
static void |
writeStringRegistryValue(String key,
String data)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Boolean regVersion1
Constructor Detail |
---|
public WindowsUtils()
Method Detail |
---|
public static void main(String[] args) throws Exception
args
-
Exception
public static void traceWith(Logger log)
public static void killByName(String name)
public static void tryToKillByName(String name)
public static void kill(String[] cmdarray) throws Exception
cmdarray
- the array of command line arguments
Exception
- if something goes wrong while reading the process list or searching for your
command linepublic static Map procMap() throws Exception
Exception
- - if something goes wrong while reading the process listpublic static Properties loadEnvironment()
public static String getProgramFilesPath()
public static String getProgramFiles86Path()
public static com.google.common.collect.ImmutableList<String> getPathsInProgramFiles(String childPath)
public static String getLocalAppDataPath()
public static String getEnvVarIgnoreCase(String var)
public static File findSystemRoot()
public static String findWMIC()
public static File findWBEM()
null
if it couldn't be foundpublic static String findTaskKill()
public static String findReg()
public static boolean isRegExeVersion1()
public static Class discoverRegistryKeyType(String key)
public static String readStringRegistryValue(String key)
public static int readIntRegistryValue(String key)
public static boolean readBooleanRegistryValue(String key)
public static boolean doesRegistryValueExist(String key)
public static void writeStringRegistryValue(String key, String data) throws WindowsRegistryException
WindowsRegistryException
public static void writeIntRegistryValue(String key, int data)
public static void writeBooleanRegistryValue(String key, boolean data)
public static void deleteRegistryValue(String key)
public static boolean thisIsWindows()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |