Solve Flake In Cypress Typing Into An Input Element

· Gleb Bahmutov · Nov. 16, 2021, 1:50 p.m.
Summary
Imagine an application that resets the input field on start up. The resets are random but usually happen within the first 200-300 milliseconds. The application code looks something like this:123456789101112<input type="text" id="flaky-input" value="" /><script> function resetText() { const input = document.getElementById('flaky-input') input.value = '' } // reset the input several times during the first couple of seconds setTimeout(resetText, 100) setTimeout(resetText, 150) setTimeou...
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →