Interview Questions

Selenium WebDriver - What is difference between assert and verify commands?

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

Selenium WebDriver - What is difference between assert and verify commands?

Assert: Assert command checks whether the given condition is true or false. Letís say we assert whether the given element is present on the web page or not. If the condition is true then the program control will execute the next test step but if the condition is false, the execution would stop and no further test would be executed.
Verify: Verify command also checks whether the given condition is true or false. Irrespective of the condition being true or false, the program execution doesnít halts i.e. any failure during verification would not stop the execution and all the test steps would be executed.

(Continued on next question...)

Other Interview Questions