Micro Focus QTP (UFT) Forums
intervw question faced in ness technologies - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Interview Questions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Interview-Questions)
+--- Thread: intervw question faced in ness technologies (/Thread-intervw-question-faced-in-ness-technologies)



intervw question faced in ness technologies - mrajeshtnl - 02-27-2012

how to make sure that the items in a wintree are sorted al

thanks for every help


RE: intervw question faced in ness technologies - inborntester - 02-27-2012

could you please try like below.

Code:
n=Window("My Computer").WinTreeView("SysTreeView32").GetROProperty("items count")
sorted = true

For i=0 To n-2 step 1
    before=Window("My Computer").WinTreeView("SysTreeView32").GetItem(i)
    after=Window("My Computer").WinTreeView("SysTreeView32").GetItem(i+1)

          If  before > after Then
            sorted = false
            Exit For
        End If

Next

msgbox(sorted)



RE: intervw question faced in ness technologies - supputuri - 05-29-2012

Are you sure this will work?

Can you do a test run let us know your optput this below code?