Forum Discussion

sumit_engineer's avatar
Occasional Contributor
11 years ago

How To Close All IE Browsers Except ALM

How To Close All IE Browsers Except IE browser in which ALM or QC is  open .? 
  • TanyaYatskovska's avatar
    10 years ago
    Hi Sumit,


    Will the following code work for you?

    Function Close_AllBrowser


      Dim pages

      pages = Sys.Browser("iexplore").FindAllChildren("ObjectType", "Page", 2)

      For i=0 to UBound(pages)

        If aqString.Find(pages(i).LocationName, "Application Lifecycle Management") = -1 Then


        End If



    End Function


    The code checks all pages opened in IE and closes all except the one where Application Lifecycle Management is specified in the title.