com.atlassian.confluence.selenium
Enum KeyboardControlKey

java.lang.Object
  extended by java.lang.Enum<KeyboardControlKey>
      extended by com.atlassian.confluence.selenium.KeyboardControlKey
All Implemented Interfaces:
Serializable, Comparable<KeyboardControlKey>

public enum KeyboardControlKey
extends Enum<KeyboardControlKey>

Enum that represents keyboard control keys (such as delete and enter). You can use this in places where you need to specify a key to type such as DefaultSelenium.typeKeys(java.lang.String, java.lang.String). In this example, you can use the result of asString() as an acceptable parameter in the key sequence.


Enum Constant Summary
DELETE
           
ENTER
           
TAB
           
 
Method Summary
 String asString()
           
 int getCode()
           
static KeyboardControlKey valueOf(String name)
          Returns the enum constant of this type with the specified name.
static KeyboardControlKey[] 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

DELETE

public static final KeyboardControlKey DELETE

ENTER

public static final KeyboardControlKey ENTER

TAB

public static final KeyboardControlKey TAB
Method Detail

values

public static KeyboardControlKey[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (KeyboardControlKey c : KeyboardControlKey.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static KeyboardControlKey valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getCode

public int getCode()

asString

public String asString()
Returns:
the string representation of this control key for use with methods that require key presses to be specified as chars/strings.


Copyright © 2003-2010 Atlassian. All Rights Reserved.