public interface PageElementKeyboardJavascript
PageElement.
PageElement.isPresent() of the corresponding page element must return true
before any of the methods of this interface are invoked, otherwise NoSuchElementException
will be raised.
NOTE: all events invoked via this class are pure Javascript events and don't simulate the real user-browser
interaction. The standard real-browser interaction is that for each pressed key a set of 'keydown', 'keypress' and
'keyup' events is triggered.
NOTE: clients are responsible for providing appropriate key codes for spacial keys for each event. See e.g.
http://unixpapa.com/js/key.html.
Use this class primarily as workaround when standard methods in
PageElement simulating user interaction don't produce desired results.| Modifier and Type | Method and Description |
|---|---|
PageElementJavascript |
keyDown(int keyCode)
Dispatches a 'keydown' event to the associated element.
|
PageElementJavascript |
keyPress(int keyCode)
Dispatches a 'keypress' event to the associated element.
|
PageElementJavascript |
keyUp(int keyCode)
Dispatches a 'keydown' event to the associated element.
|
PageElementJavascript keyDown(int keyCode)
keyCode - key codePageElementJavascript keyPress(int keyCode)
keyCode - key codePageElementJavascript keyUp(int keyCode)
keyCode - key codeCopyright © 2015 Atlassian. All rights reserved.