Replace Brittle Locators
A checkout test uses absolute XPath and styling classes copied from DevTools. Rewrite the locators so a redesign will not break them.
Catch the JavaScript Error the Test Missed
A checkout test passes while the page throws an uncaught TypeError. Use WebDriver BiDi to make the test fail on JavaScript errors.
The Dropdown That Is Not a Select
The Select helper throws UnexpectedTagNameException on a styled dropdown. Drive the custom widget correctly.
Wait for the Download, Not the Clock
An export test sleeps five seconds and then checks the file exists. It fails on slow CI and is useless on Grid. Wait for the finished file properly.
Extract a Page Object
Three tests repeat the same login steps with inline locators. Extract a LoginPage that hides locators and waits.
Fix the Flaky Login Test
A login test passes locally and fails one run in five on CI. Remove the sleeps and make it deterministic.
Survive the Guava Removal in Selenium 4.51
After upgrading the Java client to 4.51, a wait helper class no longer compiles. Migrate it off Guava types to plain Java so it builds on 4.51 and later.
Replace Every Sleep with a Real Wait
A search test is littered with driver.sleep and setTimeout calls. It takes 14 seconds and still fails in CI. Replace each sleep with the condition it was guessing at.
The Payment iFrame Bug
After entering a card number inside the payment iframe, the test cannot find the Pay button. Find and fix the context bug.
The 30-Second Negative Check
Asserting that an error is not shown takes 30 seconds every time. Diagnose the wait configuration and fix it.
The Wrong Tab
A test that opens a help link in a new tab sometimes asserts against the original tab. Fix the handle logic.
Reach the Input Inside the Shadow Root
A login test throws NoSuchElementException on an email field that is clearly on screen. The field lives inside a web component's shadow root. Fix it.
Stale Elements in a Delete Loop
Deleting every row in a table throws StaleElementReferenceException after the first deletion. Make the loop robust.
Find the Row by Its Content, Not Its Position
A test reads a user's status from row 3, column 4 of a table. Sorting changed and now it asserts on the wrong user. Locate the row by content.
Tests Interfere When Run in Parallel
A suite passes serially and fails chaotically with parallel threads. Find the shared state and isolate each test's driver.