List of usage examples for org.openqa.selenium Keys charAt
@Override public char charAt(int index)
From source file:com.google.android.testing.nativedriver.common.AndroidKeys.java
License:Apache License
private AndroidKeys(Keys key, int androidKeyCode) { this.keyCode = key.charAt(0); this.androidKeyCode = androidKeyCode; }
From source file:com.opera.core.systems.internal.input.KeyEvent.java
License:Apache License
/** * Get the special key representation, {@link Keys}, of the supplied character if there is one. If * there is no special key tied to this character, null will be returned. * * @param key unicode character code//from ww w. j av a 2s. co m * @return special key linked to the character code, or null if character is not a special key */ private static Keys getKeyFromUnicode(char key) { for (Keys unicodeKey : Keys.values()) { if (unicodeKey.charAt(0) == key) { return unicodeKey; } } return null; }
From source file:com.opera.core.systems.OperaMobileKeys.java
License:Apache License
OperaMobileKeys(Keys alias) { keyCode = alias.charAt(0); }
From source file:com.opera.core.systems.OperaWebElement.java
License:Apache License
/** * Converts a character in the PUA to the name of the key, as given by {@link * org.openqa.selenium.Keys}. If the character doesn't appear in that class then null is * returned.//from w ww . ja va 2 s. com * * @param c the character that may be a special key * @return a string containing the name of the "special" key or null */ private static String charToKeyName(char c) { // TODO(andreastt): Move this to OperaKeyboard? if (keysLookup.isEmpty()) { for (Keys k : Keys.values()) { keysLookup.put(k.charAt(0), k.name()); } } return keysLookup.get(c); }