SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jul 2001
    Location
    santa clara
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    close the active browser

    when I click on a link then the page is opened in a new browser window. If I want to close the new browser window which was opened how do I do that?

    Please help me. I tried many ways but could not get it worked.

    ------------------

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Location
    Bloomington, IL
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: close the active browser

    If the newly loaded window is active, then Browser.Close() will work.

    If not then you need to set the specific page active and then close the browser.

    MikeF

    ------------------

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: close the active browser

    Additional note....

    If you have two browser sessions open, SilkTest automatically assigns Browser as the identifer to the active browser and Browser2 as the identifier to whatever one is in the background. This can get confusing as if you issue a Browser2.SetActive (), the browser that becomes active no longer has Browser2 as the identifier, but Browser.

    So, to close a browser that's currently in the background, you'll have to do the following:

    Browser2.SetActive ()
    Browser.Close ()

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: close the active browser

    Adding to MikeF,

    If you already recognized the new window with a name use that name.close because browser.close works on active browser session and if something happens and focus chnages u r in trouble.

    ------------------
    Sree
    Sree

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:59 AM.

Copyright BetaSoft Inc.