Sunday, July 13, 2014

TestComplete - Keyboard Shortcuts With Examples

I have written this post to provide ready-to-use code to simulate some keyboard shortcuts in TestComplete.


1.     Ctrl + O is a common keyboard shortcut to open a window or a dialog or an item in any application. The following code helps you to simulate it.

Sys.Desktop.Keys "[Hold]^o"


2.     Ctrl + S is a common keyboard shortcut to save an item or a transaction. The following code helps you to simulate it.

Sys.Desktop.Keys "[Hold]^s"


3.     Alt + F4 is a common keyboard shortcut to close a window or a dialog. The following code helps you to simulate it.

Sys.Desktop.Keys "[Hold]~[F4]"


4.     It has been observed that output of some of the calculations will be displayed after entering the inputs and losing the focus from the last input control. This can be achieved by pressing TAB key after input entry. The following code helps you to simulate it.

Sys.Desktop.Keys "[Tab]"

Thanks.

Please let me know if you have trouble simulating any keyboard shortcut and I will revert with possible code sample.

Please click on following link to view a similar post on Menu Shortcuts with examples in TestComplete.
TestComplete Menu Shortcuts With Examples

No comments:

Post a Comment