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.

Screen

TerminalEmulators. Screen

new Screen(propsopt) → {Screen}

The description of a terminal emulator screen that fully supports HLLAPI.
Parameters:
Name Type Attributes Description
props Object <optional>
Initializes a screen test object using the supplied property bag.
Returns:
the description object that was initialized.
Type
Screen

Methods

cursorPosition(cursorPositionopt) → {Object|Description}

Returns the position of the cursor in the emulator screen.
Parameters:
Name Type Attributes Description
cursorPosition Object <optional>
When provided, this method acts as a setter and sets the cursorPosition value.
Properties
Name Type Attributes Description
row Number <optional>
The row position of the cursor in the emulator screen.
column Number <optional>
The column position of the cursor in the emulator screen.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored cursorPosition value; otherwise it returns 'this' for use with the builder pattern.
Type
Object | Description

id(idopt) → {number|Description}

Returns the ID value of the screen.
Parameters:
Name Type Attributes Description
id number <optional>
When provided, this method acts as a setter and sets the screen's id value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored screen's id value; otherwise it returns 'this' for use with the builder pattern.
Type
number | Description

inputFieldCount(inputFieldCountopt) → {number|Description}

Returns the number of input fields on the emulator screen.
Parameters:
Name Type Attributes Description
inputFieldCount number <optional>
When provided, this method acts as a setter and sets the inputFieldCount value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored inputFieldCount value; otherwise it returns 'this' for use with the builder pattern.
Type
number | Description

label(labelopt) → {string|Description}

Returns the label attribute of the emulator screen.
Parameters:
Name Type Attributes Description
label string <optional>
When provided, this method acts as a setter and sets the label value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored label value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description

protectedFieldCount(protectedFieldCountopt) → {number|Description}

Returns the number of protected fields on the emulator screen.
Parameters:
Name Type Attributes Description
protectedFieldCount number <optional>
When provided, this method acts as a setter and sets the protectedFieldCount value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored protectedFieldCount value; otherwise it returns 'this' for use with the builder pattern.
Type
number | Description

size(sizeopt) → {Size|Description}

Returns the total number of rows and columns in the emulator screen.
Parameters:
Name Type Attributes Description
size Object <optional>
When provided, this method acts as a setter and sets the size value.
Properties
Name Type Attributes Description
rowCount Number <optional>
The row position in the emulator screen.
columnCount Number <optional>
The column position in the emulator screen.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored size value; otherwise it returns 'this' for use with the builder pattern.
Type
Size | Description