I've been succesfully using properties and methods exposed in my application from within QTP by using Object. However I am having some obstacles accessing Arrays from my application into QTP.
Does anyone know how to do this?
For example, lets say my control has an array called Data so
(In my application the following is exposed for the snippernarrative selected)
Data = "apples";
Data = "grapes";
myvar = SnippetNarrative("snpAllergy").Object.Data
Should work, and then i could do myvar(0) ' "apples" .. however it doesnt work..
Any ideas on how to do this? thanks.
debug it. and check what are you getting in the "myvar". is it array ?? or the string separated by spaces ??
debugging says the content is
[[object Object]] type String.
so,of course, it is an array of objects... any ideas? thanks.
I have run into this probelm before. I don't think it is possible because js and vbscript handle arrays differently. I think the only solution is to pass a string at a time to build up the array.