WHAT IS DIFFERENCE BETWEEN ASSERT AND VERIFY COMMAND IN SELENIUM?



Assert command in selenium:

  • When an "assert" command fails then test execution will be aborted.
  • Assert is best used when the check value has to pass for the test to be able to continue to run. Like a log in.



Verify command in selenium:

  • When a "verify" command fails then test will continue executing and logging the failure.
  • Verify is best used to check non critical things. Like hte presence of a headline element.




Post a Comment

0 Comments