For some reason my scripts intermittently hang when it gets to the last browser.close statment. Sometimes both browsers close just fine, other times(intermittently) the last browser.close statement just hangs [img]/images/graemlins/confused.gif[/img]. The statement does close the last browser but again the script stops with the little hourglass symbol showing. Here is an example of the very end of my script.
I am sure that the title of the 2 browsers are different, isnt it? If not then you will face this issue certainly. Inorder to avoid the above problem make QTP learn the 2 instances of the browser with 2 different titles.
If the above is aint right, then why dont you try inserting an activate cmd before close.
I am not using the title property. My browser title change each time. I am using createion time to manage my open browsers. I don't think that activate is the problem because the statement is closing the browser which means it sees it. It hangs up after it closes it.
SteveK's suggestion of using:
seems to be working the script is no longer hanging after it executes the statement.
Interesting though, if the statement is hard coded in the script it takes 10sec to execute. If,however,the same statement is executed via a subroutine it happens instantly.
Keep this in my mind when you are using CreationTime in your code -> When you have one browser open and using CreationTime in the description will take longer time to identify the browser and this is a well known issue(discussed many times in this forum).