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.

Using TestRunner for Batch running scripts

saini.007saini.007 Members
edited November -1 in Sahi - Open Source
Hi,

1.) I created 3 scripts on rediffmail site.

2.) Created a myapp.suite file which included below contents:
LoginRediff.sah http://www.rediff.com/index.html
RediffInbox.sah http://f5mail.rediff.com/bn/folder.cgi?formname=sh_folder&folder=Inbox&login=to_rajeshsaini
LogoutRediff.sah http://f5mail.rediff.com/bn/folder.cgi?formname=sh_folder&folder=Inbox&login=to_rajeshsaini

3.) When i ran using the TestRunner from the command line.
The first script ran successfully, but the subsequent ones failed.

Because one script fires its action on one browser and then closes it & then launches new browser for the next script.

1.A) Is this a limitation when choosing Sahi for inhouse intranet/internet applications, as they will have such security measures in place so that the in between pages are not provided the access directly.

1.B.) Also suppose at one particular time one has sufficient test scripts and then if such security is introduced in the later stages of the development then all test scripts would not run.

How can we tackle such situations???

2.A. The problem of multiple domain to me is that when one is on a page which was URL suppose http://www.xyz.rediff.com and then when one clicks on any link it takes him/her away to some other page with http://www.xyz.yahoo.com ????

2.B. Or as my above explained case i.e., the URLs in myapp.suite are also the example of multiple domains.

Comments

  • narayannarayan Administrators
    Saini,

    Tests should ideally be atomic. They should not depend on other scripts for their setup and teardown. You should ideally have the three scripts included in one single script. The atomicity is not a limitation, but a feature. (Well, we have to see if in your case it IS a limitation and how to alleviate it).

    Both the cases that you describe come under multiple domains.
    Sahi will have a problem with multiple domains only if they are part of the same loaded page. For example, a page with xx.example.com containing an iframe with url yy.example.com. It should not be a problem if the page at xx.example.com unloads and loads yy.example.com
Sign In or Register to comment.