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 validate assert results
Hi,
We have an assert statement to verify some content in the page like page title.
If the page title is correct, th elog just shows that the assert is successful.
If the page title is incorrect, then it logs the failure and the log shows
Expected [] Actual: [].... something like this.
Can anyone please provide me the code to log the results in an excel sheet
Example:
I have a test case to verify the page title
I have used _assertEquals() to verify the page title
Then I need some code to check that if the page title is correct or not , then log the result in the excel sheet
with test case step#, script name, and status as pass or fail (If the status is pass, then the entry should be in green color, else the entry should be in red color.
Finally, when the execution is completed, i will look into the excel sheet to verify how many test cases (steps in test cases) are passed or failed.
Thanls,
SamsirSameer.
We have an assert statement to verify some content in the page like page title.
If the page title is correct, th elog just shows that the assert is successful.
If the page title is incorrect, then it logs the failure and the log shows
Expected [] Actual: [].... something like this.
Can anyone please provide me the code to log the results in an excel sheet
Example:
I have a test case to verify the page title
I have used _assertEquals() to verify the page title
Then I need some code to check that if the page title is correct or not , then log the result in the excel sheet
with test case step#, script name, and status as pass or fail (If the status is pass, then the entry should be in green color, else the entry should be in red color.
Finally, when the execution is completed, i will look into the excel sheet to verify how many test cases (steps in test cases) are passed or failed.
Thanls,
SamsirSameer.
Comments
but the info provided in 'http://sahi.co.in/w/working-with-excel-sheets' is regarding importing data from an excel sheet and verifying it.
I actually want to pump data (log messages) in to an excel sheet.
Could anyone please help me in this regard.
Thanks,
Samsirsameer.