Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to close a Window obj with a "text:="& ReportName
#1
Not Solved
Currently, the code below close all of my objects with micclaasss = window. I need to close a Window obj with a "text:="& ReportName & ".*" only.

How do I add this in?

Code:
Sub CloseWindow (ReportName)

   'CLOSE REPORTNAME BROWSER
        Set oWindow=Description.Create()
        oWindow("micclass").Value="Window"
        Set obj=Desktop.ChildObjects(oWindow)
        For i=0 to obj.Count-1
        obj(i).Close
        Next

End Sub

Do i just add:
oWindow("text").Value=ReportName
Reply


Messages In This Thread
How to close a Window obj with a "text:="& ReportName - by mv8167 - 02-02-2012, 11:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to close/restart UFT in "Not responding" status with AOM script CharlieMadrid 0 1,234 05-21-2020, 08:46 PM
Last Post: CharlieMadrid
  Object doesn't support this property or method: 'window(...).window(...).winobject' senthil5683 1 3,690 07-04-2016, 07:08 PM
Last Post: venkatesh9032
  Dynamic obj rep - get text in the class (html) marcio cravo moreira 0 2,128 05-26-2015, 06:58 PM
Last Post: marcio cravo moreira
  Read text from text file and save it into a variable in qtp arpan 3 12,974 06-19-2013, 08:34 PM
Last Post: arpan
  Need to compare two text files - ignoring some text nelly27281 2 4,584 09-09-2012, 12:09 PM
Last Post: freeboynil

Forum Jump:


Users browsing this thread: 2 Guest(s)