Enterprise Test Architecture, Page Object Model, Cucumber BDD, REST Assured, and CI/CD Pipelines
As a student or graduate of MOMO Academy, you are our frontline brand ambassador. Know a local business owner, startup founder, school, hospital, or enterprise needing custom software, a mobile app, or QA testing? Connect them with MOMO Tech Services. When your referral signs a contract, you earn 10% direct cash commission and get live shadowing experience on the project!
SDLC (Software Development Life Cycle): The overall process of planning, designing, coding, testing, and deploying software.
STLC (Software Testing Life Cycle): The focused phase dedicated exclusively to quality assurance:
| Pillar | Definition | Practical Application in Selenium |
|---|---|---|
| Encapsulation | Wrapping variables and methods together; keeping locators private. | Page Object Model: Web elements (By) are private; exposed via public action methods. |
| Inheritance | Child class inheriting fields and behavior from parent class. | TestBase manages WebDriver lifecycle; all test classes extend TestBase. |
| Polymorphism | One interface, multiple implementations. | WebDriver driver = new ChromeDriver(); (Overriding). frame(int) vs frame(String) (Overloading). |
| Abstraction | Hiding internal driver complexity behind clean APIs. | Using WebDriver interface instead of binding to concrete browser classes. |
Selenium 4 completely eliminated the legacy JSON Wire Protocol. WebDriver now communicates natively with browser drivers using the W3C Standard Protocol, resulting in faster and flakeless test execution.
// 1. Text-based locator
//button[text()='Submit Order']
// 2. Contains attribute for partial matching
//input[contains(@placeholder, 'Enter mobile number')]
// 3. Normalized whitespace
//button[normalize-space()='Login']
// 4. Following-sibling axis
//label[text()='Email']/following-sibling::input
public class LoginPage {
private WebDriver driver;
private WebDriverWait wait;
// 1. Private Locators
private By phoneInput = By.xpath("//input[@placeholder='Enter phone']");
private By submitBtn = By.xpath("//button[contains(., 'Continue')]");
// 2. Constructor
public LoginPage(WebDriver driver) {
this.driver = driver;
this.wait = new WebDriverWait(driver, Duration.ofSeconds(10));
}
// 3. Public Business Methods
public void enterPhoneNumber(String phone) {
wait.until(ExpectedConditions.visibilityOfElementLocated(phoneInput)).sendKeys(phone);
}
public void clickContinue() {
wait.until(ExpectedConditions.elementToBeClickable(submitBtn)).click();
}
}
driver.close() terminates the currently focused browser tab. driver.quit() destroys all browser windows and shuts down the background WebDriver process.ExpectedConditions.refreshed(...).MOMO IT Technologies builds custom SaaS platforms, enterprise ERPs, Flutter mobile apps, and automated test frameworks for businesses worldwide.
Students & Partners earn 10% cash commission on every client contract referred to MOMO Tech Services.