Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to close one of the browsers during runtime?
02-21-2012, 09:35 PM (This post was last modified: 02-21-2012 09:36 PM by jinnah1978.)
Post: #1
How to close one of the browsers during runtime?

I am trying to write a note and save it in "yahoo note pad"

I logged in using my credentials. When click on Notepad. it opens another tab (notepad). I want to close thew previous tab. Tried several ways. Please help me with your invaluable suggestion


SystemUtil.Run("iexplore.exe"),"www.yahoo.com"
wait(3)
Browser("Micclass:=Browser").Page("Micclass:=page").WebElement("innertext:=Mail" , "html tag:=EM").Click
Browser("Micclass:=Browser").Page("Micclass:=page").WebEdit("html id:=username").Set "................@yahoo.com"
Browser("Micclass:=Browser").Page("Micclass:=page").WebEdit("html id:=passwd").SetSecure"..................."
Browser("Micclass:=Browser").Page("Micclass:=page").WebButton("html id:=.save").Click

Browser("Micclass:=Browser").Page("Micclass:=page").WebElement("innerhtml:=Notepad").Click

Two tabs in this stage.I want to close 1st one and work on current one(Notepad)
Find all posts by this user
Quote this message in a reply
02-22-2012, 08:02 AM
Post: #2
RE: How to close one of the browsers during runtime?
Browser("CreationTime:=1").Close. Make sure the index of first tab. (You may get it from object repository).
Find all posts by this user
Quote this message in a reply
02-23-2012, 09:12 AM
Post: #3
RE: How to close one of the browsers during runtime?
Thank you buddy! You are great!
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  different types of browser close and open ajayr1982 1 210 04-05-2012 05:47 AM
Last Post: vIns
  by using creation creation time we have to close the browsers mrajeshtnl 4 545 01-24-2012 11:27 PM
Last Post: mrajeshtnl
  Close all IE browsers bend0303 2 423 01-23-2012 10:34 AM
Last Post: Ankesh
  Maximize and Close a Browser mv8167 3 515 01-18-2012 03:25 AM
Last Post: mv8167
  QTP has encountered a problem and needs to close kalyani0820@gmail.com 4 759 12-16-2011 07:21 PM
Last Post: Ankesh

Forum Jump:


User(s) browsing this thread: 1 Guest(s)