0 Shares 486 Views

Using Low-Level Procedure in TestComplete

Aug 24, 2014
486 Views

Sometimes there is a need for having some steps in your script which are out of the control of testcomplete recording feature and your scripting ability. TestComplete provide a feature so-called low-level procedure, when the actions are not determined by the interaction of the script with controls applications, and simple actions. For example consider steps below

  1. hold down the left mouse button,
  2. move the mouse pointer up a few pixels,
  3. release the left mouse button, press it again,
  4. drag pointer a few pixels to the left,
  5. Release the mouse button.

Such actions are usually necessary in graphics applications (eg, MS Paint), where neobhodimoprotestirovat drawing different shapes.
In TestComplete for such action exists to LLPlayer. To gain access to low-level routines, you must first add the item to the project Low Level Procedures Collection.

To do this, right-click on the project name, select Add – New Item and in the dialog box,

LLPMenu

Select Low-Level Procedures Collection.

LLPProjectItemNow while writing the script, you can click Start Recording a Low-Level Procedure and TestComplete will record a low-level procedure.

LolevelRecording

Once recording is stopped, the project will be recorded by a low-level procedure, which can be found in the project topic LLCollection1 .  below is sample recorded steps.

LowLevelStatements

Double click on any line opens a dialog box for editing actions. For example, the recorded delay (Column Delay) are usually not necessary and can be set to zero.

editevent

The following example shows a sample run of the recorded low-level procedure of the test script.

You will also notice a new sub gets created in your scripting unit with a call to the low level procedure just created.

Note that TestComplete can use the recorded coordinates relative to the screen or relative to a particular window. In this case we used Screen Related coordinates, i.e. the displacement of the mouse is measured from the upper left corner of the screen.

To run the same procedure with respect to a particular window, the window is enough to pass as a parameter to the method Execute:

If you do not record test scripts using tools recording TestComplete, and write them manually, you can use the object LLPlayer to perform low-level procedures. Sometimes there are situations when the usual methods (Click, Drag, etc.) for some reason does not work in the application under test, then you must use the object LLPlayer.

The LLPlayer object simulates pressing and releasing of mouse buttons, rotations of mouse wheels and pressing and releasing of keyboard keys from your scripts.

Methods of Llplayer

KeyDown Simulates pressing of a key.
KeyUp Simulates releasing of a key.
MouseDown Simulates pressing of a mouse button.
MouseMove Simulates movement of the mouse cursor.
MouseUp Simulates releasing of a mouse button.
MouseWheel Simulates rotating of the mouse wheel.

An example to use Llplayer object (from smartbear help)

Let us know if you have any experience using Low-Level Procedure in your projects or if you facing any difficulties using it via comments below.

Subscribe now to receive such information directly into your inbox.

You may be interested

Setting up Mobile Automation Project in Windows
Katalon Studio
77 views
Katalon Studio
77 views

Setting up Mobile Automation Project in Windows

Saket - Sep 20, 2017

This tutorial explains how to setup a mobile automation project and test a mobile app using Katalon Studio on Windows. This tutorial assumes that you are familiar…

Katalon Studio GUI Overview
Katalon Studio
147 views2
Katalon Studio
147 views2

Katalon Studio GUI Overview

Saket - Sep 14, 2017

GUI Overview After installing and setting up Katalon Studio for your automated test, you must understand the GUI. In this post we will walk you through the…

LeanFT Tutorial #4: Application Model Overview
LeanFT
125 views1
LeanFT
125 views1

LeanFT Tutorial #4: Application Model Overview

Saket - Sep 10, 2017

In this post we are going to focus on Application Model in LeanFT. Refer our earlier posts on LeanFT Getting Ready with LeanFT Browser Extensions and Settings…

Leave a Comment

Your email address will not be published.

Most from this category

Join The Growing Group of 15000+ Test Automation Engineers

Signup for our newsletter and get access to free downloads, as well as tips, tricks and techniques and various test automation resources.
Name
Email Address
Secure and Spam free...