Friday, 26 December 2014

Opened Notepad files closed using the QTP script


set descObj=description.create
descObj("micclass").value=".*"

set descObjcollection= desktop.ChildObjects(descObj)
MsgBox descObjcollection.count

For i=0 to descObjcollection.count-1
    print descObjcollection(i).getroproperty("title")
    '
descObjcollection(i).highlight
    text = descObjcollection(i).getroproperty("title")
    If instr(text, ".txt") Then
         descObjcollection(i).close
    End If
Next

No comments:

Post a Comment