Skip to content

Quality Engineering

Salesforce Locator Engine

A resilient Selenium locator layer for Salesforce Lightning test automation.

Quality Engineering––– views
Salesforce Locator Engine preview
Problem
Salesforce Lightning test automation kept failing with NoSuchElementException because of dynamic IDs, progressive lists, Shadow DOM and iframes.
Approach
Built an intelligent locator engine with 5 to 7 fallback strategies per element type, progressive list handling, context-aware scoping and a fluent API such as sf.within(...).type(...).
Result
Test flakiness reduced from about 50% to under 10%, and test development time cut by around 70%.

Overview

Instead of brittle driver.findElement() calls, tests use a fluent API that tries several locator strategies automatically and scopes searches to the right section of the page.

sf.within("Account Information")
  .type("Account Name", "Acme Corporation")
  .select("Type", "Customer")
  .click("Save");

Read the full write-up in the blog post.

Comments

Loading comments…

Leave a comment