BuiltIn.InputQuery Method

Applies to TestComplete 15.64, last modified on May 16, 2024


This routine is similar to InputBox, except that instead of returning a string, it returns a boolean value indicating how the user exited the dialog. The string that will be returned will be passed by reference and modified as a parameter.


BuiltIn.InputQuery(Caption, Prompt, Value)

Caption [in]    Required    String    
Prompt [in]    Required    String    
Value [in, out]    Required    String    
Result Boolean

Applies To

The method is applied to the following object:


The method has the following parameters:


The window title.


The message that asks the user to enter a value (for instance, “Enter the loop count:”).


The variable whose value is displayed in the edit box when the window appears on screen for the first time. On return it contains the value entered by the user.

Since the method returns the entered value through the Value parameter, you should use a variable for this parameter.

Result Value

InputQuery returns True and sets Value to the contents of the edit box if the user exits through OK. If the user exits through Cancel, it returns False and leaves Value as it was.


Since JavaScript, JScript, Python, C#Script and C++Script do not support the out parameters, the InputQuery function does not work in JavaScript, JScript, Python, C#Script and C++Script projects. You can use InputBox as a workaround.

See Also

ShowMessage Method
InputBox Method
MessageDlg Method

Highlight search results