Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to close new tab
#1
Not Solved
Hi,

I am facing a problem.

In my application,I have to click on a link that open a new tab. As soon as it open a new tab,I have to close this new tab only. But below code does not do this.

'********************************************
Code:
If Browser("CreationTime:=1").Exist(0) Then
  print "present"
Browser("CreationTime:=1").Close
'fncloseBrowser()
  else
  print "not present"

End If
'*******************************

It print "present' in print log but not close the new tab and show error on line "Browser("creationTime:=1").close ". Error is "Object not visible".
And when I click on 'Retry' button of this Run error dialog box and get focus on new tab (by click on new tab) then only it get closed. Unless I dont foucs,it is not get closed .
Please let me the solution for this problem.
Reply


Messages In This Thread
Unable to close new tab - by pradeep singh - 03-01-2013, 11:44 AM
RE: Unable to close new tab - by pradeep singh - 03-04-2013, 05:55 PM
RE: Unable to close new tab - by pradeep singh - 03-05-2013, 09:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Maximize and Close a Browser mv8167 4 16,728 03-26-2023, 03:55 PM
Last Post: Mike B
  Close popup ad windows dustwynn 1 3,026 10-25-2016, 05:57 PM
Last Post: Ankur
  [UFT] Close opened folder robertosalemi 1 3,389 02-10-2016, 07:06 PM
Last Post: robertosalemi
  Close browser code not working akilamurugesh 1 4,672 08-26-2014, 03:21 PM
Last Post: vinod123
  Close on Exit Issue in QTP 11.0 EGBELL 1 3,232 02-02-2014, 03:39 PM
Last Post: EGBELL

Forum Jump:


Users browsing this thread: 2 Guest(s)