SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Jul 2000
    Location
    Walsall, West Midlands, United Kingdom
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems closing Browser Window PopUp

    Hi,


    Our site opens a pop-up browser window in addition to the main window. But I'm having trouble closing it. This window does not contain the IE menu or address bar, and only contains the toolbar (back, forward, stop... etc).

    I am using IE5 DOM. I can't use the Close() method because it relies on the IE menus existing... because it uses File.Exit.Pick(), so obviously it fails because it can't find the File menu (domex.inc).

    I've also looked at other methods like CloseOthers(), and have been unsuccessful.

    I've searched through other posts here, there's a few similar but have been unhelpful.

    The only approach I have is to close the menu using the system menu. I have wrote a cheesy method using TypeKeys, which works ok:

    [ ] .TypeKeys(">ALT<") // Deliberately the > and < are wrong way round, so I can post
    [ ] .TypeKeys(">SPACE<") // System Menu Activates
    [ ] .TypeKeys(">DOWN<")
    [ ] .TypeKeys(">DOWN<")
    [ ] .TypeKeys(">DOWN<")
    [ ] .TypeKeys(">DOWN<")
    [ ] .TypeKeys(">DOWN<") // Moves down to Close
    [ ] .TypeKeys(">ENTER<") // Selects Close

    Anybody got any ideas how to improve?

    I once tested a site which opened a similar popup, back in my SilkTest 5.0.1 days, and don't remember having such problems with the Close method. I'm now using 5.0.3.2 of SilkTest.


    Thanks in advance.

    [This message has been edited by Beeblemaster (edited 07-31-2001).]

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problems closing Browser Window PopUp

    Does getting the caption of the window will help you close this popup? Anyhow you can try to maximize the popup it will let you see more stuff of the popup, trust me.

    Also you can use 'alt-f4' to close if you want to use the keyboard very clean(even better than close .

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

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Location
    Walsall, West Midlands, United Kingdom
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problems closing Browser Window PopUp

    GK, Cheers for replying...

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Does getting the caption of the window will help you close this popup?<HR></BLOCKQUOTE>

    No, I've already tried that.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Anyhow you can try to maximize the popup it will let you see more stuff of the popup, trust me.<HR></BLOCKQUOTE>

    No it don't, there's nothing else to see.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Also you can use 'alt-f4' to close if you want to use the keyboard very clean(even better than close .<HR></BLOCKQUOTE>

    I agree, I tried this earlier, using TypeKeys and it didn't work, but I've just tried the following...

    [ ] BrowserPage.PressKeys(">ALT<")
    [ ] BrowserPage.TypeKeys(">F4<")
    [ ] BrowserPage.ReleaseKeys(">ALT<")

    and it works fine

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

  4. #4
    Member
    Join Date
    May 2001
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problems closing Browser Window PopUp

    Have you tried
    [ ] Browser.SysMenu.MenuItem("Close").Pick ()


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


    [This message has been edited by mansri (edited 07-31-2001).]

  5. #5
    Member
    Join Date
    Apr 2001
    Location
    San Francisco, CA
    Posts
    76
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problems closing Browser Window PopUp

    This is very simple. How about just say ...

    YourPopupPage.SetActive ()
    Browser.Maximize () // you don't have to put this line but that is just in case...
    Browser.CloseBox.Click ()

    Trust me it works...

    - Osya ... (send me an email (ostap76@hotmail.com) if it doesn't work)

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


    [This message has been edited by Osya (edited 07-31-2001).]
    Regards,
    Osya

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Location
    Walsall, West Midlands, United Kingdom
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problems closing Browser Window PopUp

    Thanks guys, Osya's option is best, (didn't know that closebox existed).

    Works fantastic!!

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

 

 

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 11:08 AM.

Copyright BetaSoft Inc.