🚢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