To learn more about using JavaScript in LeanFT, see Setting up and working with the JavaScript SDK.
For JavaScript code samples, see Code Samples - JavaScript.

Global

Members

FunctionKeys

The Function Keys enum.
Properties:
Name Type Description
f1 string Key F1.
f2 string Key F2.
f3 string Key F3.
f4 string Key F4.
f5 string Key F5.
f6 string Key F6.
f7 string Key F7.
f8 string Key F8.
f9 string Key F9.
f10 string Key F10.
f11 string Key F11.
f12 string Key F12.

KeyModifier

The Key Modifier enum.
Properties:
Name Type Description
none Number No Modifier
ctrl Number Key CTRL is pressed
leftCtrl Number Key left CTRL is pressed
rightCtrl Number Key right CTRL is pressed
alt Number Key ALT is pressed
leftAlt Number Key left ALT is pressed
rightAlt Number Key right ALT is pressed
shift Number Key SHIFT is pressed
leftShift Number Key left SHIFT is pressed
rightShift Number Key right SHIFT is pressed
windowsLogo Number Key WINDOW is pressed
leftWindowsLogo Number Key left WINDOW is pressed
rightWindowsLogo Number Key right WINDOW is pressed

Keys

The Keys enum used in the send key function.
Properties:
Name Type Description
pa1 string The PA1 key.
pa2 string The PA2 key.
pa3 string The PA3 key.
pa4 string The PA4 key.
pa5 string The PA5 key.
pa6 string The PA6 key.
pa7 string The PA7 key.
pa8 string The PA8 key.
pa9 string The PA9 key.
pa10 string The PA10 key.
pf1 string The PF1 key.
pf2 string The PF2 key.
pf3 string The PF3 key.
pf4 string The PF4 key.
pf5 string The PF5 key.
pf6 string The PF6 key.
pf7 string The PF7 key.
pf8 string The PF8 key.
pf9 string The PF9 key.
pf10 string The PF10 key.
pf11 string The PF11 key.
pf12 string The PF12 key.
pf13 string The PF13 key.
pf14 string The PF14 key.
pf15 string The PF15 key.
pf16 string The PF16 key.
pf17 string The PF17 key.
pf18 string The PF18 key.
pf19 string The PF19 key.
pf20 string The PF20 key.
pf21 string The PF21 key.
pf22 string The PF22 key.
pf23 string The PF23 key.
pf24 string The PF24 key.
alt string The ALT key.
alternate_cursor string The ALTERNATE_CURSOR key.
attention string The ATTENTION key.
backspace string The BACKSPACE key.
backtab string The BACKTAB key.
clear string The CLEAR key.
cmd string The CMD key.
down string The DOWN key.
left string The LEFT key.
right string The RIGHT key.
cursor_select string The CURSOR_SELECT key.
up string The UP key.
delete string The DELETE key.
dup string The DUP key.
end string The END key.
enter string The ENTER key.
erase_eof string The ERASE_EOF key.
erase_input string The ERASE_INPUT key.
field_exit string The FIELD_EXIT key.
field_mark string The FIELD_MARK key.
field_minus string The FIELD_MINUS key.
field_plus string The FIELD_PLUS key.
help string The HELP key.
hexa string The HEXA key.
home string The HOME key.
insert string The INSERT key.
insert_tog string The INSERT_TOG key.
local_print string The LOCAL_PRINT key.
new_line string The NEW_LINE key.
page_up string The PAGE_UP key.
page_down string The PAGE_DOWN key.
print string The PRINT key.
rec_backspace string The REC_BACKSPACE key.
reset string The RESET key.
tab string The TAB key.
shift string The SHIFT key.
sys_req string The SYS_REQ key.
test string The TEST key.

Keys

The Keys enum.
Properties:
Name Type Description
insert string Key INSERT
delete string Key DELETE
home string Key HOME
end string Key END
pageUp string Key PAGE UP
pageDown string Key PAGE DOWN
up string Key UP
down string Key DOWN
left string Key LEFT
right string Key RIGHT
esc string Key ESC
backspace string Key BACKSPACE
return string Key ENTER
tab string Key TAB
pause string Key PAUSE/BREAK
printScr string Key PRINT SCREEN
appKey string Key APPLICATION
f1 string Key F1
f2 string Key F2
f3 string Key F3
f4 string Key F4
f5 string Key F5
f6 string Key F6
f7 string Key F7
f8 string Key F8
f9 string Key F9
f10 string Key F10
f11 string Key F11
f12 string Key F12
numLockOn string Key NUMLOCK ON
capsLockOn string Key CAPS LOCK ON
scrollLockOn string Key SCROLL LOCK ON
numLockOff string Key NUMLOCK OFF
capsLockOff string Key CAPS LOCK OFF
scrollLockOff string Key SCROLL LOCK OFF

ScrollOrientation :ScrollOrientation

Scroll Orientation.
Type:

WindowExtendedStyles

The Window Extended Styles enum.
Properties:
Name Type Description
ws_EX_ACCEPTFILES Number The window accepts drag and drop files.
ws_EX_APPWINDOW Number Forces a top-level window onto the taskbar when the window is visible.
ws_EX_CLIENTEDGE Number The window has a border with a sunken edge.
ws_EX_COMPOSITED Number Paints all descendants of a window in bottom-to-top painting order using double-buffering.
ws_EX_CONTEXTHELP Number The title bar of the window includes a question mark. When the user clicks the question mark, the cursor changes to a question mark with a pointer.
ws_EX_CONTROLPARENT Number The window contains child windows that take part in dialog box navigation.
ws_EX_DLGMODALFRAME Number The window has a double border.
ws_EX_LAYERED Number The window is a layered window.
ws_EX_LAYOUTRTL Number If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the horizontal origin of the window is on the right edge. Increasing horizontal values advance to the left. For other languages, the style is ignored.
ws_EX_LEFT Number The window has generic left-aligned properties. This is the default.
ws_EX_LEFTSCROLLBAR Number If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored.
ws_EX_LTRREADING Number The window text is displayed using left-to-right reading-order properties. This is the default.
ws_EX_MDICHILD Number The window is an MDI child window.
ws_EX_NOACTIVATE Number A top-level window created with this style does not become the foreground window when the user clicks it.
ws_EX_NOINHERITLAYOUT Number The window does not pass its window layout to its child windows.
ws_EX_NOPARENTNOTIFY Number A child window created with this style does not send the WM_PARENTNOTIFY message to its parent window when it is created or destroyed.
ws_EX_NOREDIRECTIONBITMAP Number The window does not render to a redirection surface. This is for windows that do not have visible content or that use mechanisms other than surfaces to provide their visual.
ws_EX_OVERLAPPEDWINDOW Number The window is an overlapped window.
ws_EX_PALETTEWINDOW Number The window is a palette window, which is a modeless dialog box that presents an array of commands.
ws_EX_RIGHT Number The window has generic right-aligned properties.
ws_EX_RIGHTSCROLLBAR Number The vertical scroll bar (if present) is to the right of the client area. This is the default.
ws_EX_RTLREADING Number If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the window text is displayed using right-to-left reading-order properties. For other languages, the style is ignored.
ws_EX_STATICEDGE Number The window has a three-dimensional border style intended to be used for items that do not accept user input.
ws_EX_TOOLWINDOW Number The window is intended to be used as a floating toolbar.
ws_EX_TOPMOST Number The window is placed above all non-topmost windows and stays above them, even when the window is deactivated.
ws_EX_TRANSPARENT Number The window is not painted until siblings beneath the window (that were created by the same thread) have been painted.
ws_EX_WINDOWEDGE Number The window has a border with a raised edge.

WindowState

Window State.
Properties:
Name Type Description
maximized string
minimized string
normal string

WindowStyles

The Window Styles enum.
Properties:
Name Type Description
ws_BORDER Number The window has a thin-line border.
ws_CAPTION Number The window has a title bar (includes the ws_BORDER style).
ws_CHILD Number The window is a child window. A window with this style cannot have a menu bar. This style cannot be used with the ws_POPUP style.
ws_CHILDWINDOW Number Same as the ws_CHILD style.
ws_CLIPCHILDREN Number Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window.
ws_CLIPSIBLINGS Number Clips child windows relative to each other. That is, when a particular child window receives a WM_PAINT message, the ws_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If ws_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.
ws_DISABLED Number The window is initially disabled. A disabled window cannot receive input from the user.
ws_DLGFRAME Number The window has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar.
ws_GROUP Number The window is the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the ws_GROUP style.
ws_HSCROLL Number The window has a horizontal scroll bar.
ws_ICONIC Number The window is initially minimized. Same as the ws_MINIMIZE style.
ws_MAXIMIZE Number The window is initially maximized.
ws_MAXIMIZEBOX Number The window has a maximize button.
ws_MINIMIZE Number The window is initially minimized. Same as the ws_ICONIC style.
ws_MINIMIZEBOX Number The window has a minimize button.
ws_OVERLAPPED Number The window is an overlapped window. An overlapped window has a title bar and a border. Same as the ws_TILED style.
ws_OVERLAPPEDWINDOW Number The window is an overlapped window. Same as the ws_TILEDWINDOW style.
ws_POPUP Number The window is a pop-up window.
ws_POPUPWINDOW Number The window is a pop-up window.
ws_SIZEBOX Number The window has a sizing border. Same as the ws_THICKFRAME style.
ws_SYSMENU Number The window has a window menu on its title bar.
ws_TABSTOP Number The window is a control that can receive the keyboard focus when the user presses the TAB key.
ws_THICKFRAME Number The window has a sizing border. Same as the ws_SIZEBOX style.
ws_TILED Number The window is an overlapped window. An overlapped window has a title bar and a border. Same as the ws_OVERLAPPED style.
ws_TILEDWINDOW Number The window is an overlapped window. Same as the ws_OVERLAPPEDWINDOW style.
ws_VISIBLE Number The window is initially visible.
ws_VSCROLL Number The window has a vertical scroll bar.

Type Definitions

CheckedState

CheckedState.
Type:
Properties:
Name Type Description
unchecked string
checked string
indeterminate string

DateFormatType

DateFormatType.
Type:
Properties:
Name Type Description
none string
singleDate string
singleDateRange string
multipleDateRanges string

GridSelectionMode

The selections that are possible in a grid.
Type:
Properties:
Name Type Description
rowsAndColumns string Only rows and columns can be selected; individual cells cannot be selected.
listboxSingle string Only one row can be selected.
listboxMultiple string One or more rows can be selected.
free string Any selection can be made.

Horizontal

The horizontal location of the related test object relative to the object to identify. See the LeanFT Help Center for a diagram that illustrates the way LeanFT interprets visual relations and the boundaries that are used for determining in-line related objects. Possible values for the 'Horizontal' type.
Type:
Properties:
Name Type Description
left string The related test object is located to the left of the test object to identify
right string The related test object is located to the right of the test object to identify

Location

Provides a location (relative to an object in the application) where certain operations should be performed.
Type:
  • Object
Properties:
Name Type Description
anchor Position The position within the object from which the offset is taken.
offset Object The offset from the anchor position.
Properties
Name Type Description
x Number The x-coordinate of the offset.
y Number The y-coordinate of the offset.

MouseButton

Possible values for the 'MouseButton' type.
Type:
Properties:
Name Type Description
left string Left mouse button
right string Right mouse button
middle string Middle mouse button

Point

Provides a point representation
Type:
  • Object

Position

Possible values for the 'Position' type.
Type:
Properties:
Name Type Description
topLeft string The top-left corner of this object.
topRight string The top-right corner of this object.
center string The center of this object.
bottomLeft string The bottom-left corner of this object.
bottomRight string The bottom-right corner of this object.

Proximity

The distance or hierarchical location of the related test object relative to the object to identify. See the LeanFT Help Center for more details on VRI. Possible values for the 'Proximity' type.
Type:
Properties:
Name Type Description
closestOnXAxis string The related test object is the closest object on the x-axis to the test object to identify.
closestOnYAxis string The related test object is the closest object on the y-axis to the test object to identify.
closestOnBothAxes string The related test object is the closest object on both the x- and y- axes to the test object to identify.
contains string The related test object contains the test object to identify.

ScrollType

Scroll Type.
Type:

SwipeDirection

Possible values for the 'SwipeDirection' type.
Type:
Properties:
Name Type Description
left string Swipes left.
right string Swipes right.
up string Swipes up.
down string Swipes down.

Vertical

The vertical location of the related test object relative to the object to identify. See the LeanFT Help Center for a diagram that illustrates the way LeanFT interprets visual relations and the boundaries that are used for determining in-line related objects. Possible values for the 'Vertical' type.
Type:
Properties:
Name Type Description
above string The related test object is located above the test object to identify.
below string The related test object is located below the test object to identify.

VerticalScrollPosition

Vertical Scroll Position.
Type: