One More Query on TestComplete
I have a script where i need to post few orders.
In My Script in need to enter Receipt number > i have enetered ReceiptNumber say=123 and run my script and if second time if im running script i need to have another receipt number (ie., anything other than 123).
My Query is: I need to Run script multiple times with different Receipt numbers.
in My Application Receipt Number is a text box and i need to enter different Receipt numbers while same script multiple times.
Please help me on how to Run script multiple times by automatically entering Diiferent Receipt Number without duplicates.
Thanks
Hi,
By analyzing your problem, I think you can use saving values in:
Design variable - with this solution you can save the value between test iterations.
Doc: https://support.smartbear.com/testcomplete/docs/testing-with/variables/collections/project-and-project-suite/index.htmlWrite in a variable in a script - if your test is called in one function, it will be easy to write the value in the variable.
Doc: https://stackoverflow.com/questions/19211768/saving-a-javascript-variable-for-later-usageUse excel file - save data in excel and read specific cells according to the test iteration.
Doc: https://support.smartbear.com/testcomplete/docs/testing-with/advanced/working-with-external-data-sources/excel/index.htmlDepending on which programming language you use, use random values to generate a variable value.
Example in JS: https://www.w3schools.com/jsref/jsref_random.asp.