Skip to content

Testing with Bqurious > Actions

Keyboard

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

IMPORTANT

All the keywords under this list hard fail in negative scenarios.

ActionParametersExample Usage
pressBackspaceKey Web


---

To perform the keyboard operation Backspace on object (mentioned in objectName).

> [!NOTE] 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 pressedExample 1 :
pressBackspaceKey : <Object : bqObject> <Number of Times : 2>
Presses Backspace key twice on the mentioned object bqObject
Example 2 :
pressBackspaceKey : <Object : bqObject> <Number of Times : >
Presses Backspace key once on the mentioned object bqObject
pressDownKey Web


---

To press down-arrow key on object (mentioned in objectName).

> [!NOTE] 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 pressedExample 1 :
pressDownKey : <Object : bqObject> <Number of Times : 2>
Presses Down key twice on the mentioned object bqObject
Example 2 :
pressDownKey : <Object : bqObject> <Number of Times : >
Presses Down key once on the mentioned object bqObject
pressEnterKey Web, Mobile


---

To perform the keyboard operation Enter on object (mentioned in objectName).
Example :
pressEnterKey : <Object : bqObject>
Presses Enter on the mentioned object bqObject
pressLeftKey Web


---

To press left-arrow key on object (mentioned in objectName).

> [!NOTE] 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 pressedExample 1 :
pressLeftKey : <Object : bqObject> <Number of Times : 2>
Presses Left key twice on the mentioned object bqObject
Example 2 :
pressLeftKey : <Object : bqObject> <Number of Times : >
Presses Left key once on the mentioned object bqObject
pressRightKey Web


---

To press right-arrow key on object (mentioned in objectName).

> [!NOTE] 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 pressedExample 1 :
pressRightKey : <Object : bqObject> <Number of Times : 2>
Presses Right key twice on the mentioned object bqObject
Example 2 :
pressRightKey : <Object : bqObject> <Number of Times : >
Presses Right key once on the mentioned object bqObject
pressTabKey Web, Mobile


---

To perform the keyboard operation Tab on object (mentioned in objectName).

> [!NOTE] 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 pressedExample 1 :
pressTabKey : <Object : bqObject> <Number of Times : 2>
Presses Tab twice on the mentioned object bqObject
Example 2 :
pressTabKey : <Object : bqObject> <Number of Times : >
Presses Tab once on the mentioned object bqObject
pressUpKey Web


---

To press up-arrow key on object (mentioned in objectName).

> [!NOTE] 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 pressedExample 1 :
pressUpKey : <Object : bqObject> <Number of Times : 2>
Presses Up key twice on the mentioned object bqObject
Example 2 :
pressUpKey : <Object : bqObject> <Number of Times : >
Presses Up key once on the mentioned object bqObject