Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 

Repository files navigation

πŸ§ͺ Automation Assignment: Playwright + Python – Saucedemo.com

πŸ“‹ Overview

Your task is to build a basic browser automation script using Playwright in Python to interact with a public web app: https://www.saucedemo.com.

This should demonstrate your ability to:

  • Navigate and interact with UI elements
  • Automate form submissions
  • Handle validation errors
  • Extract and export structured data

We expect you to spend a few hours on this assignment. You're free to spend more time if you’d like. You can start whenever you're ready and do not need to start this today. You can use any tool(s) or AI you want to complete this assignment.


🎯 Goals

  1. Attempt login with both valid and invalid inputs
  2. Capture and log any form validation errors
  3. After successful login, extract product names and prices
  4. Simulate a checkout attempt with missing data and log validation results
  5. Save product data to a .csv file
  6. Log all major steps and actions taken
  7. Extra Credit - Redo the same assignment without Playwright β€” use PyAutoGUI to control the browser purely by screen position/image matching. Requirements:
    • Full flow: invalid login, valid login, extract product names/prices, checkout with missing data.
    • Locate UI via screenshots (image templates) + optional OCR for text capture.
    • Include waits/retries and error handling.
    • Save CSV for products, log each major step, and take screenshots.
    • Script should run start-to-finish with no manual clicks.

βœ… Requirements

Technical

  • Use at least Python + Playwright libraries
  • Use the built-in logging module for logging
  • Save logs to a .log file
  • Save product data to a .csv file
  • Include a requirements.txt file with all dependencies
  • Script must be runnable via CLI using: python main.py
  • Optionally use pydantic and prefect.

πŸ§ͺ Testing & Validation

  • Include logs at each step, including validation errors
  • Capture screenshots when validation errors are triggered (optional extra credit)
  • Ensure the .csv data file is generated and contains accurate, expected content

πŸ“€ Submission Instructions

  1. Fork this repository
  2. Complete your implementation and commit your changes
  3. Send us your name and a link to your GitHub repo once you're done to careers@lamarhealth.com

πŸ“‚ Deliverables

  • main.py – your main automation script
  • products.csv – product data output
  • automation.log – log of all steps and errors
  • automation_screenshots/ – (optional) directory of screenshots
  • README.md – summary of the project + answers to the reflection questions below
  • Link to a video showing the full automation working (in non headless mode) and also how this appears in perfect UI.

πŸ’­ Reflection Questions (Add you answer into your README.md)

  • What steps did you prioritize first? Why?
  • How long did you actually spend on the project?
  • How did you know your automation was working?
  • What would you improve with more time?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors