OpenText™ Functional Testing for Developers JavaScript SDK

SAPGUI. EditorTO

EditorTO

Constructor

new EditorTO()

A EditorTO object,

Methods

activateColumn(columnIndexOrName) → {Promise.<void>}

Double-clicks the specified column in the grid by column name. Double-clicking selects the entire column, displays another window, or performs another application-specific action.
Parameters:
Name Type Description
columnIndexOrName number | string The name of the column or the column index.
Returns:
a promise that is fulfilled when the operation ends.
Type
Promise.<void>

activateRow(rowIndex) → {Promise.<void>}

Double-clicks the specified row in a grid.
Parameters:
Name Type Description
rowIndex number The row index.
Returns:
a promise that is fulfilled when the operation ends.
Type
Promise.<void>

clearSelection() → {Promise.<void>}

Clears the selected rows or columns in the grid.
Returns:
a promise that is fulfilled when the operation ends.
Type
Promise.<void>

doubleClick() → {Promise.<void>}

Double-clicks inside the text area at the current cursor position.
Returns:
a promise that is fulfilled when the operation ends.
Type
Promise.<void>

findAllRowsWithCellTextInColumn(text, column) → {Promise.<Array.<Array.<GridCell>>>}

Returns all rows with the specified text in the specified column, by column index.
Parameters:
Name Type Description
text string The The text to search for.
column number | string The name or the index of the column to search for.
Returns:
a promise that is fulfilled with the array of array of Cells.
Type
Promise.<Array.<Array.<GridCell>>>

findRowWithCellTextInColumn(text, column, startFromRow) → {Promise.<Array.<GridCell>>}

Returns the first row in a column that contains the specified text, by column name.
Parameters:
Name Type Description
text string The The text to search for.
column number | string The name or the index of the column to search for.
startFromRow number The index of the row from which to start the search.
Returns:
a promise that is fulfilled with the array of Cells or null if not found.
Type
Promise.<Array.<GridCell>>

pressEnter() → {Promise.<void>}

Presses the ENTER key when the grid is in focus.
Returns:
a promise that is fulfilled when the operation ends.
Type
Promise.<void>

select(startPos, endPos) → {Promise.<void>}

Selects the specified section of text in the text area and positions the cursor at the end of the selection.
Parameters:
Name Type Description
startPos number The 0-based position of the first character of the text to be selected.
endPos number The 0-based position of the character that ends the selection. The text is selected from the character at the start position and up to, but not including, the character at the end position.
Returns:
a promise that is fulfilled when the operation ends.
Type
Promise.<void>

selectMenuItemById(menuItemId) → {Promise.<void>}

Selects the specified menu item from a context menu.
Parameters:
Name Type Description
menuItemId string The SAP ID for the menu item.
Returns:
a promise that is fulfilled when the operation ends.
Type
Promise.<void>

setCursorPosition(position) → {Promise.<void>}

Positions the cursor at the specified position.
Parameters:
Name Type Description
position number The 0-based character position.
Returns:
a promise that is fulfilled when the operation ends.
Type
Promise.<void>

setText(text) → {Promise.<void>}

Sets the specified text in the text area.
Parameters:
Name Type Description
text string The text.
Returns:
a promise that is fulfilled when the operation ends.
Type
Promise.<void>

setUnprotectedTextPart(sectionNumber, text) → {Promise.<void>}

Sets the specified text in the unprotected sections of the text area.
Parameters:
Name Type Description
sectionNumber number The 1-based index of the unprotected section in which the text is set. Unprotected sections of the text area are numbered from top to bottom.
text string The text.
Returns:
a promise that is fulfilled when the operation ends.
Type
Promise.<void>

waitUntilEnabled(timeoutopt) → {Promise.<boolean>}

Waits until the test object becomes enabled or the timeout elapses. This method is useful for synchronizing your test with your application.
Parameters:
Name Type Attributes Description
timeout number <optional>
The length of time to wait (in milliseconds) for the test object to become enabled.
Returns:
a promise fulfilled with true if test object becomes enabled before the timeout is reached; otherwise, false.
Type
Promise.<boolean>