org.openqa.selenium
Enum Keys

java.lang.Object
  extended by java.lang.Enum<Keys>
      extended by org.openqa.selenium.Keys
All Implemented Interfaces:
java.io.Serializable, java.lang.CharSequence, java.lang.Comparable<Keys>

public enum Keys
extends java.lang.Enum<Keys>
implements java.lang.CharSequence

Representations of pressable keys that aren't text. These are stored in the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to http://www.google.com.au/search?&q=unicode+pua&btnG=Search


Enum Constant Summary
ADD
           
ALT
           
ARROW_DOWN
           
ARROW_LEFT
           
ARROW_RIGHT
           
ARROW_UP
           
BACK_SPACE
           
CANCEL
           
CLEAR
           
COMMAND
           
CONTROL
           
DECIMAL
           
DELETE
           
DIVIDE
           
DOWN
           
END
           
ENTER
           
EQUALS
           
ESCAPE
           
F1
           
F10
           
F11
           
F12
           
F2
           
F3
           
F4
           
F5
           
F6
           
F7
           
F8
           
F9
           
HELP
           
HOME
           
INSERT
           
LEFT
           
LEFT_ALT
           
LEFT_CONTROL
           
LEFT_SHIFT
           
META
           
MULTIPLY
           
NULL
           
NUMPAD0
           
NUMPAD1
           
NUMPAD2
           
NUMPAD3
           
NUMPAD4
           
NUMPAD5
           
NUMPAD6
           
NUMPAD7
           
NUMPAD8
           
NUMPAD9
           
PAGE_DOWN
           
PAGE_UP
           
PAUSE
           
RETURN
           
RIGHT
           
SEMICOLON
           
SEPARATOR
           
SHIFT
           
SPACE
           
SUBTRACT
           
TAB
           
UP
           
ZENKAKU_HANKAKU
           
 
Method Summary
 char charAt(int index)
           
static java.lang.String chord(java.lang.CharSequence... value)
          Simulate pressing many keys at once in a "chord".
 int length()
           
 java.lang.CharSequence subSequence(int start, int end)
           
 java.lang.String toString()
           
static Keys valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Keys[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NULL

public static final Keys NULL

CANCEL

public static final Keys CANCEL

HELP

public static final Keys HELP

BACK_SPACE

public static final Keys BACK_SPACE

TAB

public static final Keys TAB

CLEAR

public static final Keys CLEAR

RETURN

public static final Keys RETURN

ENTER

public static final Keys ENTER

SHIFT

public static final Keys SHIFT

LEFT_SHIFT

public static final Keys LEFT_SHIFT

CONTROL

public static final Keys CONTROL

LEFT_CONTROL

public static final Keys LEFT_CONTROL

ALT

public static final Keys ALT

LEFT_ALT

public static final Keys LEFT_ALT

PAUSE

public static final Keys PAUSE

ESCAPE

public static final Keys ESCAPE

SPACE

public static final Keys SPACE

PAGE_UP

public static final Keys PAGE_UP

PAGE_DOWN

public static final Keys PAGE_DOWN

END

public static final Keys END

HOME

public static final Keys HOME

LEFT

public static final Keys LEFT

ARROW_LEFT

public static final Keys ARROW_LEFT

UP

public static final Keys UP

ARROW_UP

public static final Keys ARROW_UP

RIGHT

public static final Keys RIGHT

ARROW_RIGHT

public static final Keys ARROW_RIGHT

DOWN

public static final Keys DOWN

ARROW_DOWN

public static final Keys ARROW_DOWN

INSERT

public static final Keys INSERT

DELETE

public static final Keys DELETE

SEMICOLON

public static final Keys SEMICOLON

EQUALS

public static final Keys EQUALS

NUMPAD0

public static final Keys NUMPAD0

NUMPAD1

public static final Keys NUMPAD1

NUMPAD2

public static final Keys NUMPAD2

NUMPAD3

public static final Keys NUMPAD3

NUMPAD4

public static final Keys NUMPAD4

NUMPAD5

public static final Keys NUMPAD5

NUMPAD6

public static final Keys NUMPAD6

NUMPAD7

public static final Keys NUMPAD7

NUMPAD8

public static final Keys NUMPAD8

NUMPAD9

public static final Keys NUMPAD9

MULTIPLY

public static final Keys MULTIPLY

ADD

public static final Keys ADD

SEPARATOR

public static final Keys SEPARATOR

SUBTRACT

public static final Keys SUBTRACT

DECIMAL

public static final Keys DECIMAL

DIVIDE

public static final Keys DIVIDE

F1

public static final Keys F1

F2

public static final Keys F2

F3

public static final Keys F3

F4

public static final Keys F4

F5

public static final Keys F5

F6

public static final Keys F6

F7

public static final Keys F7

F8

public static final Keys F8

F9

public static final Keys F9

F10

public static final Keys F10

F11

public static final Keys F11

F12

public static final Keys F12

META

public static final Keys META

COMMAND

public static final Keys COMMAND

ZENKAKU_HANKAKU

public static final Keys ZENKAKU_HANKAKU
Method Detail

values

public static Keys[] 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 (Keys c : Keys.values())
    System.out.println(c);

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

valueOf

public static Keys valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

chord

public static java.lang.String chord(java.lang.CharSequence... value)
Simulate pressing many keys at once in a "chord". Takes a sequence of Keys.XXXX or strings; appends each of the values to a string, and adds the chord termination key (Keys.NULL) and returns the resultant string. Note: when the low-level webdriver key handlers see Keys.NULL, active modifier keys (CTRL/ALT/SHIFT/etc) release via a keyup event. issue: http://code.google.com/p/webdriver/issues/detail?id=79


charAt

public char charAt(int index)
Specified by:
charAt in interface java.lang.CharSequence

length

public int length()
Specified by:
length in interface java.lang.CharSequence

subSequence

public java.lang.CharSequence subSequence(int start,
                                          int end)
Specified by:
subSequence in interface java.lang.CharSequence

toString

public java.lang.String toString()
Specified by:
toString in interface java.lang.CharSequence
Overrides:
toString in class java.lang.Enum<Keys>


Copyright © 2011. All Rights Reserved.