Below mentioned are the action keywords along with their example usage.
The keyboard action keywords help us to perform certain keyboard actions on an element in our script.
Suppose you wish to enter the credentials & press Enter key on the Login button of a login page.
Structure :
launchApp <parameter>
setValue <parameter>
setValue <parameter>
pressEnterKey
Action | Parameters | Example Usage |
---|---|---|
pressBackspaceKey
To perform the keyboard operation Backspace on object (mentioned in objectName). If Parameter 1 is not defined, then the key will be pressed once. | Param 1 (Optional) : The number of times the backspace key needs to be pressed | Example 1 :
Presses Backspace key twice on the mentioned object bqObject Example 2 :
Presses Backspace key once on the mentioned object bqObject |
pressDownKey
To press down-arrow key on object (mentioned in objectName). If Parameter 1 is not defined, then the key will be pressed once. | Param 1 (Optional) : The number of times the down key needs to be pressed | Example 1 :
Presses Down key twice on the mentioned object bqObject Example 2 :
Presses Down key once on the mentioned object bqObject |
pressEnterKey
To perform the keyboard operation Enter on object (mentioned in objectName). | Example :
Presses Enter on the mentioned object bqObject | |
pressLeftKey
To press left-arrow key on object (mentioned in objectName). If Parameter 1 is not defined, then the key will be pressed once. | Param 1 (Optional) : The number of times the left key needs to be pressed | Example 1 :
Presses Left key twice on the mentioned object bqObject Example 2 :
Presses Left key once on the mentioned object bqObject |
pressRightKey
To press right-arrow key on object (mentioned in objectName). If Parameter 1 is not defined, then the key will be pressed once. | Param 1 (Optional) : The number of times the right key needs to be pressed | Example 1 :
Presses Right key twice on the mentioned object bqObject Example 2 :
Presses Right key once on the mentioned object bqObject |
pressTabKey
To perform the keyboard operation Tab on object (mentioned in objectName). If Parameter 1 is not defined, then the key will be pressed once. | Param 1 (Optional): The number of times the tab key needs to be pressed | Example 1 :
Presses Tab twice on the mentioned object bqObject Example 2 :
Presses Tab once on the mentioned object bqObject |
pressUpKey
To press up-arrow key on object (mentioned in objectName). If Parameter 1 is not defined, then the key will be pressed once. | Param 1 (Optional) : The number of times the up key needs to be pressed | Example 1 :
Presses Up key twice on the mentioned object bqObject Example 2 :
Presses Up key once on the mentioned object bqObject |