Assertions in Selenium can be used in which all modes?

0 votes
Assertions in Selenium can be used in which all modes?
May 14, 2019 in Selenium by Gauri
74 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, 2019 by Pratibha
• 3,690 points

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

Which methods which can be used to handle pop-up and alerts in Python Selenium Webdriver?

Hey Kishor, Python Selenium webdriver provides following ...READ MORE

answered Jul 29, 2019 in Selenium by Abha
• 27,910 points
78 views
0 votes
1 answer

Which click command can be used to click on a specific part of webpage in Selenium?

Hi Apeksha, in Selenium IDE to click on ...READ MORE

answered Oct 17, 2019 in Selenium by Devesh
183 views
0 votes
1 answer

How selenium can be used in devops lifecycle?

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

answered May 8, 2019 in Selenium by Anvi
• 14,050 points
642 views
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,510 points
2,921 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,890 points
2,244 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,890 points
2,381 views
0 votes
1 answer
0 votes
1 answer

Can anyone explain how an AJAX call can be handled in Selenium webdriver?

Hello Megha, to demonstrate how AJAX calls are ...READ MORE

answered May 8, 2019 in Selenium by Pratibha
• 3,690 points
291 views