Micro Focus QTP (UFT) Forums

Full Version: Input box in QTP Script.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have a requirement in my QTP Script. I need to get an Input box to prompt the end user to enter data in runtime and complete the script.for eg.
At present Iam entering the hardcoded value in the script as follows

Code:
JavaWindow("UserInformationSystem").JavaInternalFrame("Valid Values").JavaTable("Table[]").SetCellData "1","7","20100912"

In place of 20100912, Iwant to get a prompt for entering the userdata

also can we get sysdate in place of the existing date.
Could you please let me know how can we do the above.
Thanks very much in advnce.
Hi Karraaruna,
This can be done using:
Code:
Dim inputVariable
inputVariable = InputBox("Message to prompt for input", "Window title")
MessageBox inputVariable
Thanks for the response, But my problem is not solved yet.

I could able to enter date in the input box but it is not assigned into the application whilte running the script..

Here it follows

Code:
Dim inputVariable
inputVariable=InputBox("Please Enter the End Date")
msgbox(inputvariable)

JavaWindow("User Information System").JavaInternalFrame("Valid values for Status").JavaTable("Table[]").SetCellData "1","7",inputVariable

but nothing is assigned to the mentioned column.
could you please tell me how can I do this

thanks very much in advacne.