public enum SpecialKeys extends Enum<SpecialKeys> implements SpecialKey, KeySequence
Enumeration of SpecialKeys used within tests.
This enumeration also implements the KeySequence interface for convenient usage.
NOTE: Some of the keys may be actually represented as Unicode/ASCII characters, nevertheless they should be supported by implementing frameworks for the convenience of API clients.
Key,
KeySequence| Enum Constant and Description |
|---|
ARROW_DOWN |
ARROW_LEFT |
ARROW_RIGHT |
ARROW_UP |
BACKSPACE |
DELETE |
ENTER |
ESC |
SPACE |
| Modifier and Type | Method and Description |
|---|---|
List<Key> |
keys()
An immutable list of keys to be typed.
|
static SpecialKeys |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SpecialKeys[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
KeySequence |
withEvents(KeyEventType... events)
Construct key sequence consisting of this special key with given key events to invoke
|
Set<ModifierKey> |
withPressed()
A set of
SpecialKeys that should be pressed during entering this sequence's KeySequence.keys(). |
public static final SpecialKeys ENTER
public static final SpecialKeys ESC
public static final SpecialKeys BACKSPACE
public static final SpecialKeys DELETE
public static final SpecialKeys SPACE
public static final SpecialKeys ARROW_LEFT
public static final SpecialKeys ARROW_RIGHT
public static final SpecialKeys ARROW_UP
public static final SpecialKeys ARROW_DOWN
public static SpecialKeys[] values()
for (SpecialKeys c : SpecialKeys.values()) System.out.println(c);
public static SpecialKeys valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic List<Key> keys()
KeySequencekeys in interface KeySequencepublic Set<ModifierKey> withPressed()
KeySequenceSpecialKeys that should be pressed during entering this sequence's KeySequence.keys(). If empty,
no special keys should be pressed during typing.withPressed in interface KeySequencenullpublic KeySequence withEvents(KeyEventType... events)
events - key events to invoke for the created sequenceCopyright © 2015 Atlassian. All rights reserved.