JavaScript in Plain English
Read post

A real AI application for automation testing — Stabilise your automation tests with Retrieval Augmented Generation for selectors

A practical approach to stabilizing automation test selectors using Retrieval Augmented Generation (RAG) with Large Language Models. The method involves storing selector data, capturing screenshots and DOM scans, creating robust prompts for LLMs to generate stable selectors, and implementing retry logic. The solution addresses common test automation challenges like flaky selectors that break due to UI changes, using AI to dynamically find elements based on natural language descriptions rather than brittle XPath or ID selectors.

    #ai#testing
Sep 26, 2025•10m read time•From javascript.plainenglish.io
Post cover image
Table of contents
Step 1: Storage systemStep 2: Screenshots and content scanningStep 3: Robust prompt(s)Step 4: Plug everything together and call an LLMGet Adrian Pothuaud’s stories in your inboxFinal: try and improve
1.8K Impressions
JavaScript in Plain English's image
JavaScript in Plain English

JSPlainEnglish's platform is a resource for JavaScript developers, offering insights into JavaScript...

99 Followers

•

799 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard