When to use Assert, Verify and WaitFor in Selenium?
Submitted by: Administrator1) assert - If the expected value is mandatory to continue with the next set of steps we will use Assert. As Assert aborts the test, if the expected value doesn't match. It is good to use for any mandatory checks.
2) verify - If the expected value is optional to continue with the next set of steps we will use Verify. As Verify continues executing with the next set of steps, if the expected value doesn't match. It is good to use for any optional checks.
3) waitFor - If your test needs to wait, if the expected value is not matching we use waitFor. We normally use waitFor for AJAX kind of controls loading within a page.
Submitted by: Administrator
2) verify - If the expected value is optional to continue with the next set of steps we will use Verify. As Verify continues executing with the next set of steps, if the expected value doesn't match. It is good to use for any optional checks.
3) waitFor - If your test needs to wait, if the expected value is not matching we use waitFor. We normally use waitFor for AJAX kind of controls loading within a page.
Submitted by: Administrator
Read Online Selenium Job Interview Questions And Answers
Top Selenium Questions
☺ | Which is the command used for displaying the values of a variable |
☺ | Can you please explain Selenium vs Imacros? |
☺ | Tell me what is the difference between an assert and a verify with Selenium |
☺ | Explain if a Selenium function requires a script argument, what would that |
☺ | What is Selenium WebDriver or Google WebDriver or Selenium 2.0? |
Top Software Testing Categories
☺ | Selenium Interview Questions. |
☺ | Soft Skills Interview Questions. |
☺ | Automation Testing Interview Questions. |
☺ | Software Quality Control Interview Questions. |
☺ | Testing Estimation Interview Questions. |