Verify command will not stop execution
of test case if verification fails. It will log an error and proceed with
execution of rest of the test case. We use verify commands in Selenium IDE when
we still want to proceed with execution of test case even if expected output is
not matched for a test step.
Assert command will stop execution of test case if verification fails. It will log an error and will not proceed with execution of rest of the test case. We use assertions in scenarios where there is no point proceeding further if expected output is not matched.
Follow @TestingQ
Assert command will stop execution of test case if verification fails. It will log an error and will not proceed with execution of rest of the test case. We use assertions in scenarios where there is no point proceeding further if expected output is not matched.
It’s pretty simple. Use assertions
when you want to stop execution of a test case if expected output is not
matched and use verification when you still want to proceed execution of a test
case if expected output is not matched.