i

Selenium Step By Step Guide

Framework Architecture

The hybrid framework can be developed with a combination of Data-Driven and Keyword-Driven frameworks, along with the TestNG library.

Let us see the underlying architecture, which gives high-level information about our automation framework.

There are a set of steps which we need to follow to create an automation framework:

  1. Test Runner class, such as a TestNG class, to run the test case.
  2. Create an Excel reading capability to read the keywords, data, and object types from the excel file.
  3. Create a UI Action class to perform the set of actions against the UI elements.
  4. Create an object reader class to read the locators from a property file.

The above are necessary steps to form a basic structure of the Automation framework. Let us see the flow of operation in the above setup of the framework:

  • Test runner class gets a set of keyword actions from the excel file, and now runner class calls the method of UI Actions Class to perform these actions. All the logic and actions should be implemented in the UI Actions Class.
  • Test runner class also calls the method of ObjectReader class to load the locators available in “ObjectRepo.properties” file.
  • Excel Reading class keeps the logic to read the data from the excel sheet.
  • Test runner class calls the Excel Reading Class method to read the data and provide data from the Data provider.