BuiltIn.InputQuery Method

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

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.

Declaration

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:

Parameters

The method has the following parameters:

Caption

The window title.

Prompt

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

Value

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.

Remarks

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