Error trying to verify array value from another script unit [//USEUNIT] in current script unit.
I am using TestComplete v11,31,242 and Jscript. I have been using TC and Jscript about three months now. So my understanding is limited. I am creating modular script units for functions that are goin...
Yes, pStat is inside of a function. It has been delared, if you look at the first block of code, it goes like (within function) -
function getPatientStat() {
. . .
var pStat = [];
var pStat =
[Aliases.browser.swce.aspnetForm.panelPatientInfo.Name.contentText,
. . .
Autocomplete works only when the "array" is inside of the main unit. Once removed, it does not!
Log.Message(pStat[3]);
Therefore, does not work when the "array" is missing from the main unit. This tells me that it is loosing track of array values one the"array" unit is completed and returns to main unit!
Any thoughts?
There has to be a way to retain the array values, so I can continue with the rest of the test.
I think you are onto something here! As I mentioned earlier, I am pretty new at this! When you say "globally", what exactly do you mean, can you clarify (with an example) please?
(Assume the MSDN ref applies to how Jscript in TC behaves. I don't use Jscript personally, but I use C# script which uses the same engine as far as I'm aware.)