What is Base class in Selenium and how it works?

0 votes
What is Base class in Selenium and how it works?
Jul 17 in Selenium by Prashant
30 views

1 answer to this question.

0 votes

Hey Prashant, in Selenium Base class is the main class which takes care of Browser setup, loading configuration file and other reusable methods like screenshot, handling sync issues and many more. With base class you can avoid code duplication and can reuse the code as much you want. Base Class works with Selenium in following manner:

  1. When we create base class and if TestCases extends BaseClass then we can use all the methods of Baseclass.

  2. Before calling actual @Test, Base class methods will get executed and Depends on annotations it will call the respective methods.

  3. We can extend this class in all test cases and we can call custom methods as well directly.

answered Jul 18 by Abha
• 19,130 points

Related Questions In Selenium

0 votes
1 answer

What is Robot Class in selenium webdriver and why it is used?

Hello Akanksha, Robot Class is used for those ...READ MORE

answered May 8 in Selenium by Pratibha
• 2,760 points
127 views
0 votes
1 answer

What is Firebug and how it is useful in Selenium Automation testing?

Hello Amit, FireBug is a plugin which comes ...READ MORE

answered May 28 in Selenium by Anvi
• 11,690 points
79 views
0 votes
1 answer
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
403 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
758 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
400 views
0 votes
1 answer

What is Apache POI in Selenium and what it is used for?

Hi Raj, Apache POI is the most commonly ...READ MORE

answered May 8 in Selenium by Abha
• 19,130 points
167 views
0 votes
1 answer