Posts

Showing posts with the label keystrokes

TestComplete Tutorial 11 - Different Ways to click on Button in Windows Desktop Applications

 There are several ways to click a button in an application:     1.  Click( ) or ClickButton( ) -                These methods are used for single click on button.             Examples -                                       myButton.Click();                                     myButton.ClickButton();         2. Keystrokes - You can click a button by simulating keystrokes that represent an access key.  An access key is an underlined symbol within the button caption.  It permits a click of a button by pressing the ALT key in combination with the assigned access key.              Example -...

TestComplete Tutorial 10 - Keystrokes

 Using different keystroke methods, you can simulate keyboard input in your tests. Different Methods are   -  SetText( )  - sets text in an edit control. Desktop.KeyDown( ) -  Simulate pressing the specified key by its virtual code.  This method is applied for Desktop objects. Desktop.KeyUp( ) -  Simulate releasing the specified key by its virtual code.  This method is applied for Desktop objects. OnscreenObject.Keys -  Send key presses to the desired object.  OnscreenObject Keys types in the specified onscreen object. Sys.Keys and Desktop.Keys  -  Send key presses to the desired object.  Desktop.Keys and Sys.Keys type in the currently focused object. Examples -  setText -                              var userName = "name mapping for  userName  button";           ...