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.
Results tracking
Hi,
I am new to Sahi and have a couple of questions.
Question #1:
I tried a few functions and I would like to keep track of my results as I go through my execution. I noticed that Sahi prints a result in the end. Can I get that result in a variable during execution?
Question #2:
How do I handle alerts. Sahi doesn't seem to be detecting alerts.
I am new to Sahi and have a couple of questions.
Question #1:
I tried a few functions and I would like to keep track of my results as I go through my execution. I noticed that Sahi prints a result in the end. Can I get that result in a variable during execution?
Question #2:
How do I handle alerts. Sahi doesn't seem to be detecting alerts.
Comments
just a suggestion :
@question #1
You can use _debugToErr , this will print everthing to the console window where the proxy is running unless redirected.
_debugToErr("Hello"); --> Hello to console
_debugToErr(_assertContainsText("", _submit("Login"))); --> true to Console
or just use the RETURN of javascript
function selfmade()
{
If ......
RETURN ("OK");
}
call: _debugToErr( selfmade() );
If you could elaborate how you wish to use this, and if we find it to be a useful feature, we could expose this as a proper Sahi API.
Thanks
Which are the global variables we can get to see the result of executed step. We are planning to keep track of every test run we we get new build and store the results into database. So like you get global variable "sahi_has_errors" which tell you whether the script has any errors. Similary i would like to know which are the global variable I can use to track the step status/result.
thanks,
Sumeet