Contributions
- 9.2KViews0likes0Comments
- 6.5KViews0likes0Comments
Re: How To Close All IE Browsers Except ALM
The Reson why i say its not simple is : 1. it has to close tabs if present in the open IE sessions . 2. sometimes when you Already have any broser session is open and then you invoke the tool it recognises it as window object . 3. The code given above is in javascript and i only use vbscript in my project . 4. i have wriiten a nice code in vbscript long back , it works fine in QTP , but when i tried to run it in test complete it dosnt work . 5. I am aware that there is difference in syntax of passing the Description of the object in qtp and test complete and i have changed that too . 6.but still dosn`t work as Desstop.childobjects in qtp gives you all childobject filter by all IE sessions , but no such method avalioble in tc ... '==================Original QTP Code========================== 'Function Close_AllBrowser() 'Set oBrowser = Description.Create 'oBrowser("micclass").Value = "Window" 'oBrowser("regexpwndtitle").Value = ".*Internet Explorer.*" ' 'Set oDialog = Description.Create 'oDialog("micclass").Value = "Dialog" 'oDialog("text").Value = "Internet Explorer" 'oDialog("is owned window").Value = "True" 'oDialog("is child window").Value = "False" ' ' ' Set oBrowserList = Desktop.ChildObjects(oBrowser) ' ' Select Case oBrowserList.count ' ' Case 0 ' Case 1 ' If Instr(oBrowserList(0).GetROProperty("text"), "Application Lifecycle Management") = 0 Then ' oBrowserList(0).Close ' wait(1) ' If oBrowserList(0).Dialog(oDialog).Exist(0) then ' oBrowserList(0).Dialog(oDialog).WinCheckBox("text:=&Always close all tabs", "nativeclass:=Button").Set "ON" ' oBrowserList(0).Dialog(oDialog).WinButton("regexpwndtitle:=Close all &tabs", "text:=Close all &tabs").Click ' End if ' End if ' ' Case Else ' For index = 0 to oBrowserList.count-1 ' If Instr(oBrowserList(index).GetROProperty("text"), "Application Lifecycle Management") = 0 Then ' oBrowserList(index).Close ' wait(1) ' If oBrowserList(index).Dialog(oDialog).Exist(0) then ' oBrowserList(index).Dialog(oDialog).WinCheckBox("text:=&Always close all tabs", "nativeclass:=Button").Set "ON" ' oBrowserList(index).Dialog(oDialog).WinButton("regexpwndtitle:=Close all &tabs", "text:=Close all &tabs").Click ' End if ' End if ' Next ' ' End Select ' ' Set oBrowser =Nothing ' ' Set oDialog = Nothing 'End Function '==============================================================6.5KViews0likes0CommentsRe: How To Close All IE Browsers Except ALM
Its not that easy as you have explained . Do you have a code that returns the URL of each open IE browser Session ? Even if we take a count of Open IE browesers ? how will you know the URL of each ? i dont see any Such property in test complete .6.4KViews0likes0CommentsRe: Reading variables for Testcomplete project from excel or csv files
FilePath = "C:\Envi.ini" Section = "Environment" Function Read_INI(Section,FilePath) Set FSO = CreateObject("Scripting.FileSystemObject") If FSO.FileExists(FilePath) Then Set ini = Storages.INI(FilePath) ProjectPhase = ini.GetSubSection(Section).GetOption("ProjectPhase","") Else Read_INI = False End If End EnviFunction NOTE : 1.Make Sure in your Enviormnet.ini File [ROOT] is added on the first line . 2.No Space betweeen ProjectPhase and = 1 . '==================C:\Envi.ini================ [Root] [Environment] ProjectPhase=1 '==================Envi.ini================1.1KViews0likes0CommentsHow To Close All IE Browsers Except ALM
How To Close All IE Browsers Except IE browser in which ALM or QC is open .?Solved8.1KViews0likes10Comments