Assertions in Selenium can be used in which all modes?

0 votes
Assertions in Selenium can be used in which all modes?
May 14 in Selenium by Gauri
24 views

1 answer to this question.

0 votes

Hello Gauri, Assertions in selenium can be used in 3 modes which are explained below:

  1. assert: If you use assert in your tests then the test will be aborted if the assert fails. Next test case will start executing in case you are running a test suite. So when the Assertion fails, all the test steps after that line of code are skipped. The solution to overcoming this issue is to use a try-catch block.
  2. verify: If verify is used then the test case will not abort even if the verify fails. It will continue executing and log the failure for the failed conditions. Mostly, the Verify command is used to check non-critical things. In such cases where we move forward even though the end result of the check value is failed.
  3. waitFor: waitFor command waits for the condition to become true. If the condition is true already the test case continues else it waits for the conditions to become true. If the condition doesn’t becomes true within specified time-out period test will fail and halt.
answered May 14 by Pratibha
• 2,740 points

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

How selenium can be used in devops lifecycle?

Hey Catherine, as we know that a ...READ MORE

answered May 8 in Selenium by Anvi
• 10,830 points
33 views
0 votes
1 answer

How can Custom Firefox Profiles be created and used in Selenium?

Hi Vijay, to create Custom Firefox Profile ...READ MORE

answered May 24 in Selenium by Abha
• 17,400 points
28 views
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,050 points
280 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
641 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
269 views
0 votes
1 answer
0 votes
1 answer