๐ŸšขFrameworks

๐Ÿ“š Types of Frameworks in Selenium

There are several types of frameworks that can be used with Selenium for test automation:

๐Ÿ› ๏ธ Module Based Framework

  • This framework separates test scripts into different modules like login, home page, user management etc.

  • Each module consists of code related to that specific module.

  • ๐Ÿ‘ Benefits: Easy to maintain, modules can be reused, improves code reusability.

๐Ÿ“ฆ Keyword Driven Framework

  • Test cases and test data are separated from test scripts.

  • Test cases and data are stored in Excel sheets and test scripts contain keywords.

  • Keywords call reusable functions to perform actions.

  • ๐Ÿ‘ Benefits: Improves maintainability, minimizes code changes.

๐Ÿ“‹ Data Driven Framework

  • Test data is separated from test scripts.

  • Test data is stored in Excel sheets, CSV files etc.

  • Test script reads test data and runs iteratively with different data sets.

  • ๐Ÿ‘ Benefits: Single script can be used multiple times just by changing data.

๐Ÿ”€ Hybrid Framework

  • Combination of two or more frameworks.

  • Most commonly, keyword and data driven frameworks.

  • Keywords call functions and also read data from external files.

  • ๐Ÿ‘ Benefits: Leverages benefits of multiple frameworks.

๐Ÿ“Š BDD Framework

  • Uses Behavior Driven Development approach with Cucumber.

  • Tests are written in simple English text using Gherkin language.

  • Tests can be understood by non-technical people.

  • ๐Ÿ‘ Benefits: Improves readability and collaboration between teams.

  1. Object Repository: The file that contains the locators or elements used in the test script. The object repository is used to store all the locators or elements used in the test script. It helps in maintaining the locators or elements in a centralized location.

Last updated