JavaScript SDK Reference
OpenText Functional Testing for Developers provides test automation capabilities in your IDE for Agile Development, Continuous Integration, Mobile, and DevOps.
Use the OpenText Functional Testing for Developers 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 JavaScript SDK code samples.
To learn more about using JavaScript in OpenText Functional Testing for Developers, see Setting up and working with the JavaScript SDK.
Using the LFT Namespace
Start your code with a var <variable name> = require ("leanFT")
statement to load the main LeanFT module. In the code samples, we use the variable name LFT. Therefore, we refer to the 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. |
Namespaces
Class | Description |
---|---|
AI | Provides the SDK for executing AI-based tests. |
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. |
Provides the SDK for testing objects using UI Automation. | |
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. |
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. |
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. |
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. |