Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

How can I close a new browser window?

MagUiMagUi Members
edited 9:31AM in Sahi - Open Source
Hi!

I have the following problem: I need to check that my system open a new browser window with certain information (a pdf file), but then, close this new window (because there is a lot of new browser intances that will be opened, and, eventually, IE crash). There is a way to do that?

Thanks

Comments

  • narayannarayan Administrators
    MagUI,

    This is a tricky problem.

    When the download happens on the same window, Sahi downloads the file to its tmp/download folder and returns a 204 response, so that the browser stays on the previous page.

    In this case a new window is opened and if it gets 204, the window stays blank (am I right?). Unfortunately, this also means that it does not have Sahi's code injected in the new window. So you cannot use something like _popup("xx")._closeWindow();

    I will have a look at this and see if I can send back a normal response with html such that you can call _popup("xx")._closeWindow(); in just your case.

    Please email me, to remind me to work on this. Also mention whether there is a pattern to the window titles of these opened pages.

    Regards,
    Narayan
  • Hi Narayan!

    Like you said, when the new windows is opened, stays blank. But the data that must be showed on that window is correctly saved on "download" folder, so I have no problem for obtain that data.

    I will email you right now. Thanks!
  • Hi Narayan,
    i have the same problem have you any solution for that?
  • i have a solution:-)

    install the firefox plugin:
    Tab mix plus and enable under "tab closing" the option:

    "Do not close window when closing last tab"
  • Is this issue solved?

    Thanks,

    André.
  • Hi,

    I have a similar situation where a new popup window is opened for a file download with name as "Untitled - Google Chrome" and this window does not close when using _popup("/Untitled/")._closeWindow();
    Was this issue solved ? If so kindly post how it was handled. I see this is a very old thread so i am hoping some fix was given in the later versions.

    Thanks,
    Archana
Sign In or Register to comment.