Over 10 years we help companies reach their financial and branding goals. Engitech is a values-driven technology agency dedicated.

Gallery

Contacts

411 University St, Seattle, USA

engitech@oceanthemes.net

+1 -800-456-478-23

Automated Web Element Detection and Selector Management Tool

INDUSTRY
Software Testing / Quality Assurance
CLIENT TYPE
Software development organization
SERVICE PROVIDED
Python tool development with AI automation
OBJECTIVE
Detect web page selector changes to prevent test failures
TECHNOLOGY STACK
Python, Anthropic API, Llama agents, Playwright Core Focus: Element detection and automated change alerting

The Client

Manual selector updates don’t scale. Every UI change creates work. And while the team considered making tests handle all possible variations, that approach creates flaky, complex tests that are harder to maintain.

Instead, they needed something focused: detect changes, alert the team, and let humans review before updating. This keeps tests simple and reliable.

Our Approach

We built a Python tool that works alongside their existing tests to detect and report changes to selectors.

Element Detection with AI

The tool uses Anthropic and Llama agents to analyze web pages and identify:

  • Current selectors across the page
  • New elements not previously seen
  • Elements that have been removed or moved
  • Changes in element hierarchy

Real Browser Testing

Playwright automates browser interaction to:

  • Navigate to live pages
  • Extract selectors using multiple strategies (ID, CSS, XPath)
  • Validate that selectors actually work
  • Handle dynamic content properly

Change Detection and Alerts

The tool compares the current page structure against the database and alerts the team when:

  • A selector no longer works
  • New elements appear (popups, buttons, forms, page steps)
  • Element hierarchy changes
  • Each alert includes what changed and where

Human Review Workflow

Changes aren’t applied automatically. The QA team:

  • Reviews each alert with specific details
  • Validates that the change is real and relevant
  • Approves updates before they go into the test database
  • This prevents bad updates from breaking tests

The Solution

The tool monitors target pages, detects changes, and alerts the team with enough detail for quick manual review and approval.

This focused approach means:

  • Selectors stay accurate without constant manual work
  • Tests stay simple and reliable
  • Changes are caught before they break tests
  • The team can respond quickly to UI updates

Technologies Used

Python

core tool logic

Anthropic API

intelligent selector and change analysis

Llama Agents

validation and confidence scoring

Playwright

real browser automation

Database

centralized selector storage and change history

Results & Business Impact

The project delivered a tool that reduces selector maintenance work while keeping tests stable.

Key outcomes:

  • Eliminated cascading test failures from outdated selectors
  • UI changes are caught before tests break
  • Manual maintenance time is significantly reduced
  • The QA team can focus on new tests instead of fixing broken ones
  • A clear alerting system makes it easy to stay on top of changes

The team now responds to UI changes proactively instead of discovering broken tests in production.

Key Takeaways

This project shows how focused automation can solve real problems without over-engineering. Rather than trying to make tests handle everything, we built a tool that detects problems and lets humans handle the judgment calls.

The result is a sustainable system that scales as the application grows.

Need Help with QA Automation? If your test suite struggles with maintenance, reliability, or scaling whether it’s selector issues, flaky tests, or complex automation workflows, AWJ Engineering can help you build solutions that work. Contact our team to discuss your QA automation challenges.