adspace
What is difference between assert and verify commands?
Answer Posted / Situ Singh
In Selenium WebDriver, both 'assert' and 'verify' are used for testing conditions. However, the main difference lies in when they check the condition: 'Assert' checks a condition immediately (synchronously), whereas 'Verify' checks a condition periodically (asynchronously). 'Assert' throws an exception if the condition is not met, while 'Verify' does not. Also, it's recommended to use 'assert' for critical conditions and 'verify' for non-critical ones.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers