Safari rendering keeps breaking my ui test selectors—can ai actually help write something stable?

I’ve been wrestling with WebKit rendering quirks in Safari for months now. Every time a page loads slightly differently or an element shifts during render, my selectors break. I end up constantly tweaking XPath expressions and CSS selectors, which feels like I’m fighting the browser instead of testing the app.

I’ve heard about AI tools that can generate test workflows from plain text descriptions, but I’m skeptical. Can an AI actually understand Safari-specific rendering behavior well enough to write selectors that don’t snap every time the page loads half a millisecond slower?

What I really need is something that accounts for the quirks I’m seeing—elements that appear in DevTools but don’t interact the same way, subtle layout shifts that throw off coordinate-based clicking, that kind of thing.

Has anyone actually used an AI copilot to generate a WebKit-aware test workflow? Did it handle the weird edge cases, or did you end up rewriting most of it anyway?