18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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 configure auto-setup of sahi?
Hi,
I'm quite new to Sahi, my testing team has been using Sahi for testing the web application. I am the autamation/release engineer in the team, so I was looking for something like sahi-console.exe or sahi-console.bat, but cudnt find one
. I hope there must be a way out to provide the parameters through command line or in some property file to run sahi as the way my team member told that pressing alt+double-click, select a module and then click play, it seemed very far from being automated
.
Hope I have clarified my query in easy n simple way neways you can always reply back to me with portions that are not clear to u and I'l b thankful for the help provided.
Regards,
Amit Pandey
I'm quite new to Sahi, my testing team has been using Sahi for testing the web application. I am the autamation/release engineer in the team, so I was looking for something like sahi-console.exe or sahi-console.bat, but cudnt find one
Hope I have clarified my query in easy n simple way neways you can always reply back to me with portions that are not clear to u and I'l b thankful for the help provided.
Regards,
Amit Pandey
Comments
Have a look at sahi\batch_runners\sample_commandline.bat
and other information in sahi\batch_runners directory.
I am facing an issue as I have to run the SAHI scripts through Ant on my Red-Hat server. The IE or Firefox settings work very well, as per my configuration on my PC as it is a Windows machine and parameters corresponding to it have been passed. But on the server, I am unable to provide the parameters as Firefox is my preferred browser.
Any input in this regard will be very helpful.
Regards,
Amit
That will give us more clues.
Just a small query: Has anyone tried to run SAHI on a Linux server and if yes, how to configure the sahi.xml file as it has got references to toggle_ie_proxy.exe and various similar Windows based configuration. I am facing these issues as I am trying to automate running SAHI on my RHEL server.
I have provided the ant/lib the two sahi jars, created a suite of sahi scripts to automate the run but the browser related configuration is not working for me as once i've tried to run it on lynx also but it bombed, so I am in a curry over its implementation on the server.
Hoping for a quick response.
Regards,
Amit
to and remove the line
Thanking you for kind cooperation.
Regards,
Amit
The sample.xml is in sahi/batch_runners/ant folder. Please use that.
Regards,
Amit
[automation@anduinqe sahi]$ ant -f sample.xml run-ff-tests
from duplicate session which then runs the sahi scripts, which you can see above......but only till FM_Invoices.sah and then the server shows no response.
I tried to change some configuration in sample.xml but the initial failures are still occuring.
Regards,
Amit
The log message i.e. sahi.log contains:
I think I am missing out in specifying some configuration related to firefox on RHEL server, though I have modified the "-profiles" in browser option to "-P" to work in Linux, but still some pieces are missing to execute it on the server. The problem of triggering the same ant script twice (which I mentioned in my earlier post) to run SAHI scripts also seems dubious to me. I also went in browser/ff/profiles/ to view some .ini files which contained reference to Windows so I became skeptic about the profiles option too......
Hoping for your kind cooperation.
Regards,
Amit
I think I have a similar problem.
I've created a test suite called testportal.
I use Iceape and Iceweasel in linux.
Can I run the test and get the result directly from the shell?
My problem has still not been solved. I would like to state my problem again and hope someone must have faced it earlier
I am trying to automate running SAHI scripts through Ant on RHEL (Red Hat Enterprise Linux) server with firefox by calling the scripts from a suite as advised above.
I am facing connection issues as I think (I may be wrong also...kindly correct me) the profiles mentioned in ${SAHI_DIR}/browser/ff/profiles/sahi0-9 contain a reference to Windows which I checked in compatibility.ini. So, I think its somehow related to specifying configurations and settings for firefox in my sahi-build.xml
I hope this overview of my problem is sufficient for clearing my position in SAHI implementation. For any further queries regarding the same you can always post a reply on the topic.
Regards,
Amit
Try and create a new profile in sahi/config/ff_profile_template folder. On this profile, modify your proxy settings to point to sahi. Then delete all the profiles in sahi/browser/ff folder. restart sahi and try. When you restart, this template profile gets copied over to ff folder.
I must warn you that doing multithreaded playback does not work properly on ff. You may need to set the number of threads to 1.
Thanks for your helpful suggestion.
I have a query regarding specifying the proxy settings as to which file should be modified to point it to my SAHI sever?
Sorry, I missed one of your posts. I do not think the problem is with profiles.
Since a lot of the tests ran and then it suddenly stopped, try the following:
1) Move FM_Invoices.sah to the top of the suite and see if the playback stops there.
If it does, then remove it and see if the rest proceed. We can debug FM_Invoices.sah after that.
2) If the tests still stop after some time, open a shell, and as soon as the scripts stop running, do a 'netstat' command on the shell. Check if there are a lot of connections which have been left open. If yes, then check to see that http.keep_alive=true in config/sahi.properties. If you are using https, or if you need to keep http.keep_alive=false for some reason, then increase the time between tests in a suite by increasing suite.time_between_tests to a high enough value. Note that the value is in milliseconds.
3) If you see that this still does not help, break the suite into two or more, and invoke them through different ant targets giving some time between each to help the connections be freed.
As to modifying the settings on the ff profile, just open ff with that profile, make your settings changes through the browser ui (tools -> options...) and once you close the browser the settings would have persisted. But I do not think you have to go this path. Just put back the older ff_profile_template from your downloaded zip, and delete the folders in browser/ff/profiles.