Share this page

# UFT Developer JavaScript SDK Reference

UFT Developer provides test automation capabilities in your IDE for Agile Development, Continuous Integration, Mobile, and DevOps.

Use the UFT Developer JavaScript SDK to write functional tests in JavaScript to test your application. This SDK reference describes all of the objects, classes, and definitions available in the SDK and provides UFT Developer JavaScript SDK code samples.

Note: This reference covers UFT Developer versions 15.0 through 15.0.2. Any version specific changes are indicated where relevant.

To learn more about using JavaScript in UFT Developer, see Setting up and working with the JavaScript SDK.

## Using the LFT Namespace

Start your code with a `var <varible name> = require ("leanFT")` statement to load the main LeanFT module. In our code samples, we use the variable name LFT. Therefore, we refer to our main namespace as LFT.

Within this namespace, you can use the following functions, namespaces, classes, enumerations, and types:

## Functions

Function | Description
--- | ---
afterTest | Call this function after each test method.
beforeTest | Call this function before each test method.
cleanup | Performs an SDK cleanup when connection ends.
init | Initializes the SDK with the specified configuration.

Back to top

## Namespaces

Class | Description
--- | ---
APITesting | Provides the SDK for executing API tests.
Insight | Provides the SDK for image-based object identification.
Java | Provides the SDK for testing Java objects.
Mobile | Provides the SDK for testing objects in mobile applications.
Oracle | Provides the SDK for testing Oracle objects.
SAPGUI | Provides the SDK for testing SAPGUI objects.
SAPUI5 | Provides the SDK for testing SAPUI5 objects.
StdWin | Provides the SDK for testing standard Windows objects.
TerminalEmulators | Provides the SDK for testing Terminal Emulators objects.
Web | Provides the SDK for testing Web objects.
WinForms | Provides the SDK for testing .NET Windows Forms objects.
WPF | Provides the SDK for testing WPF objects.

Back to top

## Classes

Namespace | Description
--- | ---
Desktop | A top-level Window or Dialog test object.
ImageUtils | Provides image utilities, such as OCR, image comparisons, and image find operations.
Keyboard | Enables low-level keyboard operations.
Mouse | Enables low-level mouse operations.
Reporter | Provides the means to report custom events, additional data, and configuration for the report.
SDK | The LeanFT SDK base class.

Back to top

## Enumerations

Enum | Description
--- | ---
FunctionKeys | Represents the function keys.
KeyModifier | Represents additional pressed keys.
Keys | Represents keyboard keys.
ScrollOrientation | Represents the orientation of the scroll bar.
WindowExtendedStyles | Represents extended window style properties.
WindowState | Represents the window's current state (maximized/minimized).
WindowStyles | Represents window style properties.

Back to top

## Types

Type | Description
--- | ---
CheckedState | The state of a check box.
DateFormatType | Indicates whether a date entity refers to a single date or to one or more date ranges.
GridSelectionMode | The selections that are possible in a grid.
Horizontal | The horizontal location of the related test object relative to the object to identify.
Location | The location (relative to an object in the application) at which to perform the operation.
MouseButton | The mouse button to use.
Point | The coordinates of a point on the screen.
Position | Indicates the corners or center of an object.
Proximity | The distance or hierarchical location of the related test object relative to the object to identify.
ScrollType | The type of scrolling operation.
SwipeDirection | The direction of the swipe.
Vertical | The vertical location of the related test object relative to the object to identify.
VerticalScrollPosition | The position of the Vertical scrollbar.
Aut | An abstraction of an AUT process launched by the user.
NativeObject | Represents a native object in an application. Returned by any test object's nativeObject method, enabling you to access the object's native properties and methods.
RectLocation | Describes the location and size of a rectangular area on the screen.

Back to top

Tips to improve your search results... UFT Developer JavaScript SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: