Forum Discussion
From the help (https://support.smartbear.com/testcomplete/docs/reference/program-objects/builtin/inputbox.html)
"
Result Value
If the user presses OK, InputBox
will return the entered string. Otherwise, it returns Default."
So, clicking cancel returns whatever you have indicated in the "Default" value... it doesn't cancel a script or test or anything... just returns a value.
If you're not using JavaScript, JScript, Python, or C++, then yes, InputQuery will work... but any of those languages won't work with InputQuery because of the "out" parameters.
So, if you want to use "InputBox", then set your default value to be whatever would be the "stop the test" value you desire. That way, if the user clicks "Cancel", then that default value will be returned as the result and the test will halt as you code it.... but note that if the user does not change the default value and clicks "OK", then it will still halt the test.
If you truly want to be able to create a dialog that will allow the user to control the test run, then I suggest you look into UserForms (https://support.smartbear.com/testcomplete/docs/testing-with/advanced/user-forms/about.html).
> I am invoking the BuildIn InputBox to get user input from my TestComplete 12.5 Vbscript.
Thus InputQuery() was suggested as a quick effortless replacement.
Though the reply by tristaanogre is definitely more detailed and descriptive.
Related Content
Recent Discussions
- 18 hours agodhundley