SilkTest Question:

Download Job Interview Questions and Answers PDF

How to sort List of List of String?

SilkTest Interview Question
SilkTest Interview Question

Answer:

[+] testcase test() appstate none
[ ]
[ ] LIST OF LIST OF STRING llsStr =
{{"1234","A"},{"2242","B"},{"2234","C"}}
[ ] Print(Sort(llsStr))
[+] LIST OF LIST OF STRING Sort (LIST OF LIST OF STRING llsStr)
[ ]
[ ] LIST OF STRING lsStr
[ ] INTEGER i, j , k
[ ] k = ListCount(llsStr)
[+] for (i=1;i <= k;i++)
[+] for (j=i+1; j<=k; j++)
[+] if val(llsStr[i][1]) > val (llsStr[j][1])
[ ] lsStr = llsStr[j]
[ ] llsStr[j] = llsStr[i]
[ ] llsStr[i] = lsStr
[ ]
[ ]
[ ] return llsStr

Download SilkTest Interview Questions And Answers PDF

Previous QuestionNext Question
I want to remove printing of this script of the test case in result window. How can I do this?How to hide Password in the script file?