Function Reference

Last modified: June 18, 2025

Introduction

The tables below list all the built-in functions of ATS. There is one table per category.

Widget – Set

FunctionSupported WidgetsDescription
Set BooleanSlider ValueBooleanSlider⚠ Deprecated in favor of Set Value.
Checks if the given value is available for the BooleanSlider and sets the value.
Set BootstrapRTE ValueBootstrapRTE⚠ Deprecated in favor of Set Value.
Sets the given value as current value for the BootstrapRTE value. Strings can be formatted via html-code.
Set Checkbox Set Selector ValueCheckbox Set SelectorChecks/clears the Select all checkbox.
Set Checkbox Set Selector Value (all)Checkbox Set SelectorChecks/clears the Select all checkbox.
Set Checkbox ValueCheckboxSets the value of a checkbox.
Set CKEditor ValueCKEditor⚠ Deprecated in favor of Set Value.
Sets the CKEditor content value.
Set File ManagerFileManagerSets the file manager to the given file path to upload a file.
Set Grid Selector Checkbox ValueGrid SelectorChecks/clears the checkbox for a given column and row caption in a grid selector widget.
Set Grid Selector Radiobutton checkedGrid SelectorSelects the radio button for the given column and row caption.
Set InputReferenceSelector ValueInputReferenceSelector⚠ Deprecated in favor of Set Value.
Sets the input reference selector to the given value.
Set Row Cell ValueDataGridSet the cell value for a particular column in a data grid row.
Set Simple Checkbox Set Selector ValueSimple Checkbox Set SelectorChecks/clears the checkbox found by a given entity attribute value.
Set Value¹Standard widgets: TextBox, TextArea, DropDown, RadioButton, DatePicker², ReferenceSelector, SearchInput Text, SearchInput DropDown.
Marketplace widgets: OnChange Inputbox, BooleanSlider, Bootstrap Wysiwyg Editor (Bootstrap RTE), CK Editor For Mendix, Input Reference Selector, Radiobutton List, Switch³, AutoComplete.
Sets the value of all supported widgets.
Set Value (by index)Drop-Down, Reference Selector, Search Input Drop-DownSets the value of all supported drop-down widgets by index.

¹ Since ATS version 2.9.4 the Set Value function will unfocus the widget after setting the value and wait for any on change / on leave microflows to finish before proceeding with the next steps in a test case.
² The date/time format depends on the device type. For mobile devices, the date/time should be formatted in the ISO 8601 standard (meaning, yyyy-MM-ddTHH:mm for date and time, yyyy-MM-dd for date, or HH:mm for just time). Seconds should be omitted. For desktop devices, the string should be formatted so as to match the date/time picker format. This format is locale-dependent (for example, for the US, the format is MM/dd/yyyy, hh:mm a). ³ Use values on and off for Switch widget.

Widget – Get

FunctionSupported WidgetsDescription
Get Active Tab CaptionTabContainerReturns the caption of the active tab page.
Get BooleanSlider ValueBooleanSlider⚠ Deprecated in favor of Get Value.
Returns the current value of the BooleanSlider as a string.
Get BootstrapRTE ValueBootstrapRTE⚠ Deprecated in favor of Get Value.
Returns the current BootstrapRTE value as an HTML string.
Get Checkbox Set Selector ValueCheckbox Set SelectorFinds the checkbox by column caption and cell value and returns its value.
Get Checkbox Set Selector Value (all)Checkbox Set SelectorReturns the Select all checkbox value.
Get Checkbox ValueCheckboxReturns true if the checkbox is checked.
Get CKEditor ValueCKEditor⚠ Deprecated in favor of Get Value.
Returns the CKEditor value.
Get Dialog Message TextConfirmationDialog, DialogMessageGet the text from message and confirmation dialogs.
Get Grid Selector Box ValueGrid Selector BoxReturns the current checkbox/radio button value.
Get IndexDropDown, ReferenceSelector, SearchInput DropDownGets the index of selected values in a drop-down menu (for example, an EnumSelect or ReferenceSelector).
Get InputReferenceSelector ValueInputReferenceSelector⚠ Deprecated in favor of Get Value.
Returns the current value of the InputReferenceSelector.
Get Item/Row IndexDataGrid, TemplateGrid, ListViewGets the index of a row in a data grid or an item in a template grid or list view.
Get Row Cell ValueDataGridGets the cell value of a data grid row for a given column name.
Get Simple Checkbox Set Selector ValueSimple Checkbox Set SelectorReturns the current value of the checkbox found by the entity attribute value.
Get Total Item/Row CountDataGrid, TemplateGrid, ListViewGets the total grid count from the paging status. Does not work if pagination is not shown.
Get Validation MessageAll widgetsReturns the validation message of a widget.
Get ValueStandard widgets: TextBox, TextArea, DropDown, RadioButtons, DatePicker, ReferenceSelector, SearchInput Text, SearchInput DropDown, Label, Input Reference Set Selector.
Marketplace widgets: OnChange Inputbox, BooleanSlider, BootstrapWysiwygEditor (Bootstrap RTE), CKEditor For Mendix¹, InputReferenceSelector, RadiobuttonList, Switch², AutoComplete, Format String, Custom String.
Returns the current value of all supported widgets.
Get Visible Item/Row CountDataGrid, TemplateGrid, ListViewReturns the number of currently visible items/rows in a template grid, data grid, or list view.
Groupbox is CollapsedGroupBoxGets the group box collapsed state: true if collapsed, otherwise false.

¹ The Get Value function for CKEditor returns the inner HTML of the widget. Because of the way the CKEditor is implemented, it might generate different HTML tags depending on which browser is used (for example, in some versions of Firefox, the tag <br type="_moz"> is added. This means that we cannot guarantee that the returned HTML from Get Value will be the same across all browsers. ² Use values on and off for Switch widget.

Widget – Assert

FunctionSupported WidgetsDescription
Assert Active Tab CaptionTabContainerAsserts a certain value for the caption of an active tab page.
Assert BooleanSlider ValueBooleanSlider⚠ Deprecated in favor of Assert Value.
Asserts that the BooleanSlider is set to the given value.
Assert BootstrapRTE ValueBootstrapRTE⚠ Deprecated in favor of Assert Value.
Asserts that the BootstrapRTE value is equal to the given value.
Assert Checkbox Set Selector ValueCheckbox Set SelectorFinds the checkbox-by-entity attribute and asserts that the checkbox is set to the given value.
Assert Checkbox ValueCheckBoxAsserts the value of a checkbox.
Assert CKEditor ValueCKEditor⚠ Deprecated in favor of Assert Value.
Compares the CKEditor value with the given value.
Assert Grid Selector ValueGrid SelectorAsserts the value of checkbox/radio button for a given column and row captions in a grid selector.
Assert InputReferenceSelector ValueInputReferenceSelector⚠ Deprecated in favor of Assert Value.
Asserts that the input reference selector has the given value.
Assert Simple Checkbox Set Selector ValueSimple Checkbox Set SelectorAsserts that the checkbox found by the given entity attribute value is checked/cleared.
Assert Validation MessageAll widgetsAsserts a validation message with a certain text.
Assert ValueStandard widgets: Text Box, Text Area, DropDown, RadioButton, DatePicker, ReferenceSelector, SearchInput Text, SearchInput DropDown, Label input reference set selector.
Marketplace widgets: OnChange Inputbox, BooleanSlider, BootstrapWysiwygEditor (Bootstrap RTE), CKEditor For Mendix, InputReferenceSelector, RadiobuttonList, Switch¹, AutoComplete, Format String, Custom String.
Asserts the current value of all supported widgets.
Dropdown has OptionDropDown, ReferenceSelector, SearchInput DropDownReturns true if the value is available in a drop-down menu.

¹ Use values on and off for Switch widget.

Widget – Find

FunctionSupported WidgetsDescription
Find/Assert DataGrid RowDataGridFinds/asserts a data grid row by a certain column value (or values).
Find/Assert DialogWindow, DialogMessage, ConfirmationDialogFinds/asserts a dialog by Title or Type.
Find/Assert Menu ItemNavigationTree, MenuBar, SimpleMenuBarFinds/asserts a visible menu item in a navigation tree, menu bar, and simple menu bar.
Find/Assert WidgetAll widgetsFinds/asserts a Mendix widget by its given name. It is possible to use a sequence of names as a path (separated by spaces).
Find Checkbox Set SelectorCheckbox Set SelectorFinds a checkbox by a given cell value and column caption. Returns the first match.
Find Checkbox Set Selector (all)Checkbox Set SelectorReturns the Select all checkbox.
Find Grid SelectorGrid SelectorFinds a checkbox/radio button by the column and row caption.
Find Item/RowDataGrid, TemplateGrid, ListViewFinds a row/item in a data grid, template grid, or list view by index.
Find Item/Row (by child element)DataGrid, TemplateGrid, ListViewFinds an item or row of a template grid, data grid, or list view containing a specified element.
Find Selected Item/RowDataGrid, TemplateGrid, ListViewReturns the first selected item/row as a web element.
Find Simple Checkbox Set SelectorSimple Checkbox Set SelectorFinds the checkbox by the given value.
Find Widget Child NodeAll widgetsFind a node within a Mendix widget. Also matches the widget node itself. The function is limited to search only within widgets that are visible.

Widget – Other

FunctionSupported WidgetsDescription
Cancel DialogConfirmationDialogClicks Cancel on a confirmation dialog.
Click DataGrid RowDataGridClicks a data grid row by column value.
Click Dropdown Div Converter dropdown buttonDropdown Div ConverterClicks the drop-down div converter drop-down button.
Click Dropdown Div Converter split buttonDropdown Div ConverterClicks the drop-down div converter split button.
Click Menu ItemNavigationTree, MenuBar, SimpleMenuBarClicks a menu item in a navigation tree, menu bar, and simple menu bar.
Click WidgetAll widgetsClicks a Mendix widget (for example, button, link, image) by its name.
Click Widget ButtonListView, ReferenceSelectorClicks on one of the following special widget buttons: Refresh Button / Loadmore / ClearSearchField (ListView) Goto, / Adds (ReferenceSelector).
Close DialogWindow, DialogMessage, ConfirmationDialogClicks the
button on a Confirmation, Error, Warning, or Info dialog box.
Close GroupBoxGroupBoxCloses a group box.
Confirm DialogConfirmationDialog, DialogMessageClicks the Proceed/OK button on a Confirmation, Error, Warning, or Info dialog box.
Open GroupBoxGroupBoxOpens a group box.
Set ListView SearchListViewSets the ListView search text.
Sort DataGridDataGridSorts a data grid by the given column.
Toggle BooleanSlider ValueBooleanSliderToggles the value of the Booleanslider.
Toggle Checkbox Set SelectorCheckbox Set SelectorFinds a checkbox by a given entity attribute and inverses the value.
Toggle Checkbox Set Selector (all)Checkbox Set SelectorInverses the Select all checkbox.
Toggle Checkbox ValueCheckboxClicks a checkbox to toggle its value.
Toggle Grid Selector Checkbox ValueGrid SelectorInverses the checkbox found by a given column and row caption.
Toggle Simple Checkbox Set Selector ValueSimple Checkbox Set SelectorInverses the value of the checkbox found by the given entity attribute value.

Mendix

FunctionSupported WidgetsDescription
Assert Current PageN/AAsserts that a certain page is open by checking the current page title. Note that the page title may depend on the user's language! For dialog boxes, use the Find/Assert Dialog function.
Get Current Page TitleN/AReturns the current page/form title.
LoginStandard login pageLogs in to the Mendix application with the standard login page or on the cloud using MxID.
LogoutN/ATriggers the logout/logoff from application via the Client API. Use this keyword in the teardown of your test cases to end the user session. This will work regardless of the UI state.
Mendix waitN/AWait for microflow and UI activities.
Open Mendix ApplicationN/AOpens a Mendix application at the website URL in a browser with Mendix-specific settings.

Web

FunctionDescription
Assert Element Attribute EqualsAsserts that an attribute of the given element equals the specified value.
Assert Element matches SelectorMx4/Mx5 - Returns whether given element matches the selector.
Close WindowCloses the currently active window. Does not switch to another window automatically.
Close Window & Auto-SwitchCloses the currently active window and automatically switches to the next one.
Element matches SelectorReturns whether the given element matches the selector.
Execute JavaScript IntegerExecutes the JavaScript snippet. Runs asynchronously when the timeout is set. Returns an integer.
Execute JavaScript StringExecutes the JavaScript snippet. Runs asynchronously when the timeout is set. Returns a string.
Execute JavaScript WebElementExecutes the JavaScript snippet. Runs asynchronously when the timeout is set. Returns a web element.
Find ElementFinds a web element. It optionally restricts the search to the specified SearchContext element. The occurrence lets you specify which element to fetch from the result list, starting at 1 for the first element (defaults to the first element).
Find Element by CSSFinds a web element by CSS. It optionally restricts search to the specified SearchContext element. The occurrence lets you specify which element to fetch from the result list, starting at 1 for the first element (defaults to the first element).
Find Element by IDFinds a web element by the ID. It optionally restricts the search to the specified SearchContext element. The occurrence lets you specify which element to fetch from the result-list, starting at 1 for the first element (defaults to the first element).
Find Element by SizzleFinds a web element by Sizzle. Optionally restrict search to the specified SearchContext element. The occurrence lets you specify which element to fetch from the result list, starting at 1 for the first element (defaults to the first element).
Get Current Window HandleReturns the handle (meaning, the identifier) of the currently active window.
Get Property ValueReturns the property value from the web element. (Does not have access to Dojo widget properties).
Get Selected Option IndexReturns the index of the first selected option in a select element.
Get Selected Option TextReturns the text of the first selected option in a select element.
Get Selected Option ValueReturns the value of the first selected option in a select element.
Get TextGets the visible (meaning, not hidden by CSS) innerText of this element, including sub-elements, without any leading or trailing whitespace.
Is Element DisplayedReturns true if the supplied element is displayed (visible).
Is SelectedChecks whether the checkbox is selected.
MaximizeMaximizes the current browser window.
Open Application⚠ Deprecated in favor of Open Mendix Application.
Opens an application at the application's URL in a browser.
Open Website⚠ Deprecated in favor of Open Mendix Application.
Select Option⚠ Deprecated in favor of Select Option by Index, Select Option by Text, and Select Option by Value.
Select Option by IndexSelect the option at the given index.
Select Option by TextSelect all options that display text matching the argument.
Select Option by ValueSelect all options that have a value matching the argument.
Set Browser Dimensions⚠ Deprecated in favor of Set Size.
Set Page Load TimeoutSets the amount of time (in milliseconds) to wait for a page load to complete before throwing an error. If the timeout is negative, page loads can be indefinite.
Set SizeSets the size of the current browser window. This will change the outer window dimension, not just the view port.
Switch to Default FrameSelects either the first frame on the page, or the main document when a page contains iframes.
Switch to FrameSelect a frame using its previously located WebElement.
Switch to Next WindowSwitches to the next open window. An error is thrown if there is only one window. Returns the window handle (meaning, the identifier) of the new active window.
Switch to WindowSwitches to the window via its identifier. An error is thrown if the window is not found.
Unfocus WebElementRemoves focus from a web element by calling the blur method.
Wait for ConditionRepeatedly runs the condition JavaScript snippet every Interval (in milliseconds) until one of the following is fulfilled:
  • The snippet returns neither null nor false
  • The snippet throws an unignored exception
  • The timeout (in milliseconds) expires
Wait for Condition JSWaits until the given expression returns true.

Mouse & Keyboard

FunctionSupported WidgetsDescription
Accept Browser AlertN/AAccepts the alert available.
Clear WebElementWebElementClears a web element (input or text area).
ClickWebElementClicks in the middle of the given web element.
Click/DoubleclickAll web elementsPerforms a click or double-click and waits for Mendix activities
Click CoordinatesN/AClicks a given point on the page as described by the X and Y offset. If no reference element is given, the upper-left corner of the page is used as point of origin for calculating the desired point. Otherwise, the upper-left corner of the reference element is used.
Dismiss Browser AlertN/ADismisses the alert available.
DoubleclickWebElementPerforms a click or double-click and then a wait for Mendix activities.
Focus and Clear Element ValueWebElementSets an input element to an empty string.
Focus WebElementWebElementFocuses the web element and performs a wait afterwards.
HoverWebElementHovers a web element.
Send EnterN/ASimulates pressing Enter in the element.
Send KeysN/ASimulates typing Text into the element.

Logic

FunctionSupported WidgetsDescription
AssertN/A⚠ Deprecated.
A hamcrest assert.
Assert 1N/A⚠ Deprecated in favor of Assert equalTo.
Asserts that the value is 1. ([null]=0).
Assert all not nullN/AFails if one of the objects is null.
Assert at least one not nullN/AFails if all the objects are null.
Assert Both not nullN/AFails if one or both objects are null.
Assert Condition FailsN/AThis assert always fails. If an attached condition fails, it is simply not executed (and thus this keyword does not fail). (Use this keyword to assert that another keyword fails).
Assert containsNoStringN/AAsserts false that the subject contains a string that is equal to matcher parameter (for example, testcasetool contains case, it fails case).
Assert containsStringN/AAsserts that the subject contains a string that is equal to the matcher parameter (for example, testcasetool contains case).
Assert endsWithN/AAsserts that the subject ends with a string that is equal to the matcher parameter (for example, testcase ends with case).
Assert EqualsN/A⚠ Deprecated in favor of Assert equalTo.
Asserts that the two values are equal.
Assert equalToN/AAsserts that the subject is equal to matcher parameter (for example, 100 is equal to 100 or house is equal to house).
Assert equalToIgnoringCaseN/AAsserts that the subject is equal to the matcher parameter while ignoring the case (for example, house is equal to House).
Assert equalToIgnoringWhiteSpaceN/AAsserts that the subject is equal to the matcher parameter while ignoring whitespaces (for example, testcase is equal to ' testcase ').
Assert falseN/A⚠ Deprecated in favor of Assert equalTo.
Asserts the Boolean value to be false.
Assert greaterThanN/AAsserts that the subject is greater than the matcher parameter (for example, 1000 is greater than 100).
Assert greaterThanOrEqualToN/AAsserts that the subject is either greater than or equal to the matcher parameter (for example, 1000 is greater than 100, 1000 is equal to 1000).
Assert lessThanN/AAsserts that the subject is less than the matcher parameter (for example, 100 is less than 1000).
Assert lessThanOrEqualToN/AAsserts that the subject is either less than or equal to the matcher parameter (for example, 100 is less than 1000, 1000 is equal to 1000).
Assert not equalsN/AAsserts that two values are not equal.
Assert not falseN/AAsserts that the examined value is not false.
Assert not trueN/AEither false or null.
Assert nullN/AFails if the object is not null.
Assert null (internal)N/AThe internal Assert null functions that allows a Boolean parameter to invert the result.
Assert Property ValueN/A⚠ Deprecated in favor of Assert element attribute equals.
Gets the property/attribute from the web element and asserts that it equals the given value.
Assert startsWithN/AAsserts that the subject starts with a string that is equal to the matcher parameter (for example, testcase starts with test).
Assert trueN/A⚠ Deprecated in favor of Assert equalTo.
Assert XML equivalentN/AAsserts that two XMLs are equivalent.
Concatenate StringStringConcatenate strings. Any number of the arguments can be null.
If Null Then 0 (Integer)N/A⚠ Deprecated.
Checks the input value and sets it to 0 if it is null.
Is not NullN/AReturns true if object is not null, false otherwise.
Push ATS ScriptsN/A⚠ Deprecated as it only served an internal purpose.
Pushes generic ATS scripts to the client (jQuery, helpers functions).
RegExp MatchStringReturn the n'th match of the given regular expression in the search string (uses JS string.match).
Return First Valid BooleanBooleanReturns the first Boolean from the parameter list that is not null.
Return First Valid IntegerIntegerReturns the first integer from the parameter list that is not null.
Return First Valid StringStringReturns the first string from the parameter list that is not null.
Return First Valid WebElementWebElementReturns the first web element from the parameter list that is not null.
Set Implicit WaitN/A⚠ Deprecated as it only served an internal purpose.
Set Return ValueN/AUse this function in custom actions to set the return value of the custom action. When using the "extract action" feature this function call will be added automatically, where applicable.
SleepN/AThe waits "sleep time" in milliseconds.

Generators

FunctionSupported WidgetsDescription
Generate GUIDN/AGenerates and returns a globally unique identifierGUID.
Get Current DateTime StringN/AReturns the current date and time in the supplied format (Java date format) (for example, yyyy-MM-dd HH:mm:ss.
Random NumberN/ACreates a random integer using Math.floor(Math.random() * (max - min)) + min. You need to define the min (included) and max (excluded).
Random StringN/ACreates a random alphanumeric string using Math.random().toString(36).slice(2,8). Optionally, it allows you to add a prefix or postfix.