What are the Junit Annotations used in Selenium Scripts

0 votes
Jun 11, 2019 in Selenium by Priyanka
1,105 views

1 answer to this question.

0 votes

Hi Priyanka, there are many annotations available in Junit, but the ones which are used very frequently in Selenium scripts and framework are:

  1. @Test: @Test annotation is used to run a Junit test.

  2. @Before: @Before annotation is used to run any specific test before each test.

  3. @BeforeClass: This method executes once before running all test. Initialization of properties files, databases etc are done in the beforeClass method.

  4. @After: This method executes after each test.

  5. @AfterClass: Like @BeforeClass, @AfterClass executes once after executing all test methods.

  6. Parameterized JUnit class: A parameterized class is used to run the same scenario with multiple datasets.

answered Jun 12, 2019 by Maria

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

What are the different assertions or check points used in selenium test scripts?

Hey Shakti, the most common types of ...READ MORE

answered Jun 26, 2019 in Selenium by Abha
• 28,140 points
2,128 views
0 votes
1 answer

What are some of the browser commands used in Selenium Webdriver?

Hi Nakul, some of the most frequently ...READ MORE

answered May 14, 2019 in Selenium by Abha
• 28,140 points
808 views
0 votes
1 answer

What are the main types of regex quantifiers used in Selenium Webdriver?

Hi Andrew, some of the regex quantifiers ...READ MORE

answered Jun 26, 2019 in Selenium by Abha
• 28,140 points
5,615 views
0 votes
2 answers

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,500 points
13,686 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,149 views
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,910 points
7,227 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,879 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP