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


Please Help Members By Posting Answers For Below Questions

Have you created any framework?

1035


Do you know how to locate a link using its text in selenium?

983


what will be the first salary and what will be the hike in the salary?

925


What’s selenese?

918


How can you fetch an attribute from an element? How to retrieve typed text from a textbox?

1195