Skip to main contentSkip to Jobs

Automation framework examples

Short, opinionated skeletons you can paste into new repos or discuss in interviews. Adapt folder layout, fixtures, and reporting to your team standards. See also Remote SDET & QA listings and SDET jobs in India.

Playwright — smoke flow

// tests/example.spec.ts — Playwright (TypeScript)
import { test, expect } from '@playwright/test';

test('checkout happy path', async ({ page }) => {
  await page.goto('https://example.com/app');
  await page.getByRole('button', { name: 'Add to cart' }).click();
  await expect(page.getByText('Cart (1)')).toBeVisible();
});

Selenium — Page Object sketch

// Example Page Object + test (Java-ish pseudocode)
public class LoginPage {
  private final WebDriver driver;
  private final By user = By.id("username");
  private final By pass = By.id("password");
  public LoginPage(WebDriver driver) { this.driver = driver; }

  public void open(String baseUrl) { driver.get(baseUrl + "/login"); }
  public void signIn(String u, String p) {
    driver.findElement(user).sendKeys(u);
    driver.findElement(pass).sendKeys(p);
    driver.findElement(By.css("button[type=submit]")).click();
  }
}

Examples are for education; they omit waits, reporting, and parallel grid configuration you would add in production.