05-19-2010, 01:54 PM
Hi Kishore,
I would suggest you to go with the below way.
Step1: Create a Description object for "Browser" object class and Retrieve the Active browser count after clicking on the image/text files.
Step2: Use the loop > iterate thru the loop and retrieve the Browser property "Name" value using GetROProperty.
Step3: Use Instr function to search for the expected filename content in the entire Browser Name > once it is found > close the current browser > Exit out of the Loop
Code will be something like this as given below :
It would work fine as you expected
I would suggest you to go with the below way.
Step1: Create a Description object for "Browser" object class and Retrieve the Active browser count after clicking on the image/text files.
Step2: Use the loop > iterate thru the loop and retrieve the Browser property "Name" value using GetROProperty.
Step3: Use Instr function to search for the expected filename content in the entire Browser Name > once it is found > close the current browser > Exit out of the Loop
Code will be something like this as given below :
Code:
Expected_FileName="test Image file Filename"
Set br=description.Create
br("micclass").value="Browser"
Set br_collection=Desktop.ChildObjects(br)
br_count=br_collection.count-1
For i=0 to br_count
Current_brName=br_collection(i).GetROProperty("Name")
If (instr(1,Current_brName,Expected_ImageFileName)>0) then
br_collection(i).close
Exit for
End if
Next
It would work fine as you expected