18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

How to run test suite without close the IE window after each test

sluslu Members
edited November -1 in Sahi - Open Source
Hi,

I am evaluating some web test tools and sahi is one of them. I will like all tests run in one IE session or I can config the tool according to my need. Now when I run the test suite, the tool will open a new IE for each of the test which is not what I want.

Could you please help me with this?

Thanks,
Shirley

Comments

  • sumeetsumeet Members
    you can pass the relative path of the URL in you test suite file for each sahi script. For more information see this page - http://sahi.co.in/w/Running+multiple+tests+in+batch+mode
  • sluslu Members
    I did modify userdata\bin\ie.bat to point to the base of URL of the tested application and in the test.suite I passed the relative path of the URL for each sahi script. I run the test suite from command line by "ie.bat ..\scripts\[mypath]\apptest.suite".

    I tried both browserOption = -noframemerging and -framemerging, both of them will open a new IE windows for each sah script. With noframemerging, the IE window will be closed after each sah script and open a new IE, while with framemerging, the IE window will not be closed after each sah script and each sah script will open a new one.

    I am not expect this behaviours. What I expect is the first sah script will open a new IE window, and all other sah script will use the same session of the IE, even not a new tab.

    How can I do that?

    Thanks.
  • sumeetsumeet Members
    you can have one script calling the scripts you mentioned in test suite, and you can just included the new script to your test suite to run. But this way you may need additional steps to have related page navigated
  • sluslu Members
    Thanks for the reply.
    I tried the way you suggested, but it did not run any script except the one included in the test suite.
    Could you please give me an example?
  • narayannarayan Administrators
    Hi Slu,

    If you try to run all the scripts in a single session, you will never be able to run the tests in parallel.
    Most of the time, the only extra thing that needs to be done, is to login again into the website.

    Sumeet's suggestion is to run them all as a single script by including all the test files in a single file.


    _include("script1.sah");
    _include("script2.sah");
    _include("script3.sah");

    etc.

    The disadvantage with this is that if there is an error in script1.sah, the second script will not run. Additionally, all the logs will be written into a single file instead of a file for each script. As more and more scripts are added, you will appreciate the need for running each script as an atomic unit.

    Regards,
    Narayan
Sign In or Register to comment.