Web Automation Using Selenium
  • About The Book
  • Selenium
    • Introduction
      • What is testing and why?
      • What is Selenium and Why?
    • Getting Started
      • Audience
      • Prerequisite
      • Set up
      • Getting Started - Hello World..!!
      • What are drivers
    • Locators
      • CSS Selectors
      • XPath Selector
    • WebDriver
      • WebDriver Methods
      • WebDriver Types
    • WebElement(s)
      • WebElement Methods
      • Looping Through WebElements
    • Waits In Selenium
  • TestNG
    • Introduction
    • TestNG Setup
    • First Test Script
    • Some of the features of TestNG
    • TestNG Annotations
      • @Test
      • @DataProvider
  • Maven
    • Introduction
  • Framework Development
    • Introduction
    • Building Framework
      • Technology Stack
      • Page Object Model (POM)
      • Setup
      • What our framework contain
      • Packages
        • Context
        • Factory
        • Listeners
        • Pages
      • Creating first automation test
  • Common Interview Questions
    • Selenium-Related
Powered by GitBook
On this page

Was this helpful?

  1. Framework Development
  2. Building Framework

Packages

PreviousWhat our framework containNextContext

Last updated 5 years ago

Was this helpful?

Our framework will contain following packages inside src/test/java source folder. (Since it's the testing code always recommended to write in src/test/java instead of src/main/java, even it makes sense to delete src/main/java)

  1. context - Will contain all the necessary classes which hold constants, global variables etc.,

  2. factory - Will contain all the factory methods. Like creation of page objects.

  3. listeners - Will contain all the TestNG listeners for logging, reporting and mailing etc.,

  4. pages - Will contain all the Page Object classes.

  5. report - Will contain reporting related code.

  6. tests - Will contain our actual automation test cases.

  7. util - Will contain all the utility classes and methods that will hep us to run, log, report our test cases.

Even create one more source folder src/test/resources. Which will be the location for all of our non java files.

  1. drivers - For drivers that are required by selenium.

  2. config - For all configuration and property files.

  3. suites - For test suites.

Once we create all these packages, our project is going to look similar to.

We will go through packages one by one and create classes in them.

Links to all the source files will be available, we'll be concentrating mainly on important methods in those classes.

project structure with packages and folders