Multiple Browser Tabs Testing

I have opened browser with 5 tabs, and the tabs should be change dynamically, Ii need to close the 3rd tab. How will you write a code for it?

Showing Answers 1 - 3 of 3 Answers

Swapneel Jadhav

  • Aug 29th, 2016
 

Option Explicit
Dim ObjDesc, ObjColl, BrName, i
Set ObjDesc=Description.Create
ObjDesc.Add "micclass","Browser"
Set ObjColl=Desktop.ChildObjects(objDesc)
For i=0 to ObjColl.count-1 Step 1
BrName=ObjColl(i).GetRoProperty("name")
If BrName="Google" Then
Dont do anything
Else
ObjColl(i).Close

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions