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.

Assertion

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

Can you please tell me, what is the significance of "Assertion"? When should we add assert statements? Is it necessary to add assertion in our script?

Thanks in advance!!

Comments

  • narayannarayan Administrators
    Hi Ravinder,

    If you want to verify that a calculator works correctly, you can

    click on 2,
    click on +
    click on 3
    click on =

    At this point suppose the result shown by your newly developed awesome calculator is 23.

    If you did not assert that the result is 5, your script would report a success!

    So you need an assertion when you expect something and want to verify that the actual is the same as the expected value.

    Hope that helps.

    Regards,
    Narayan
  • Ok. Suppose i have to access 5 links then should i add assertion for all these links???
Sign In or Register to comment.