"CloseAllTabs" method closes all Tabs in the browser including browser, but as the original poster, he wanted only only active and the rest of the tabs has to be deleted.
Thanks, Uday QTP \ UFT Videos <http://www.youtube.com/user/AnemUday/videos> On Thursday, 15 August 2013 23:42:12 UTC+5:30, [email protected] wrote: > > ' Close some Application > If Browser("Home").Exist Then > Browser("OMNI").CloseAllTabs > End If > > On Tuesday, August 13, 2013 10:14:49 PM UTC-7, Venkat Reddy Bandaru wrote: >> >> Thanks day for your help >> >> Thanks, >> Venkat Reddy Bandaru >> [email protected] >> + 91 9884524606 >> On 13-Aug-2013 10:29 PM, "udayanem" <[email protected]> wrote: >> >>> Hi Venkat, >>> >>> See the below code. Please let me know if you didnt understand anything. >>> >>> strRequiredTab="Your Browser Name" >>> >>> Set obj=description.Create >>> obj("micclass").value="Browser" >>> >>> Set childObjs=Desktop.ChildObjects(obj) >>> childCount=childObjs.count >>> For i=0 to childCount-1 >>> strBrowserName=childObjs(i).getROProperty("name") >>> If strBrowserName<>strRequiredTab Then >>> strVal="hwnd:="&childObjs(i).getROProperty("hwnd") >>> browser(strVal).close >>> End If >>> Next >>> >>> >>> Thanks, >>> Uday >>> QTP \ UFT Videos <http://www.youtube.com/user/AnemUday/videos> >>> >>> On Tuesday, 13 August 2013 09:04:12 UTC+5:30, Venkat Reddy Bandaru wrote: >>>> >>>> Hi Experts, >>>> I need some help on closing all tabs except current one in IE8/9 >>>> Could you anyone please write me a piece of code for me? >>>> >>>> Thanks >>>> >>>> Thanks, >>>> Venkat Reddy Bandaru >>>> [email protected] >>>> + 91 9884524606 >>>> >>> -- >>> -- >>> You received this message because you are subscribed to the Google >>> "QTP - HP Quick Test Professional - Automated Software Testing" >>> group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> For more options, visit this group at >>> http://groups.google.com/group/MercuryQTP?hl=en >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "QTP - HP Quick Test Professional - Automated Software Testing" >>> group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> -- -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en --- You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
