Forum Discussion
tristaanogre
6 years agoEsteemed Contributor
Is there a particular reason why you can't use the dictionary object provided natively in Windows?
See
https://support.smartbear.com/testcomplete/docs/scripting/dictionary-object.html
- theultimate6 years agoNew Contributor
I am not used with dictionaries in javascript.
I ve tried something like this:
function testt() { var arrList = getActiveXObject("Scripting.Dictionary"); for (let i = 1; i <= wndConspanAnalysisGrid.wRowCount; i++) { var arrListColumns = getActiveXObject("Scripting.Dictionary"); //Principal keys for (let j = 1; j <= wndConspanAnalysisGrid.wColumnCount; j++) { arrListColumns.Add(GetCellText(0, j), GetCellText(i, j)); } var arrayTest = (new VBArray(arrListColumns.Items())).toArray(); Log.Message("Count " + arrayTest.length);
for (let k = 0 ; k < arrayTest.length; k++) Log.Message(arrayTest[i]);
arrList.Add(GetCellText(i, 0), arrListColumns); } return arrList; }My new question is how can i print to log.message the whole dictionary to see if its working properly or a function to get the specific element from this dictionary?
- tristaanogre6 years agoEsteemed Contributor
I'm not sure you can.... There would have to be some way to convert the dictionary object into a string to write out to the log... and I'm not sure that you can natively do that.
- theultimate6 years agoNew Contributor
It must be, then what's the point of this dictionary?
Related Content
- 2 years agolia
- 4 years agonewbiexiii
- 8 years agoJohn_Laird
Recent Discussions
- 2 days agovladd1