Ugh, I feel your pain. Dynamic content + Selenium JS = nightmare fuel.
Try using `driver.wait(until.elementLocated())` with a custom timeout.
Or, if you’re dealing with AJAX-heavy stuff, `until.jsReturnsTrue()` can save your sanity.
Pro tip: Log the DOM state before waits to debug why things fail.
Also, maybe give Playwright a spin? It handles waits way better IMO.
Try using `driver.wait(until.elementLocated())` with a custom timeout.
Or, if you’re dealing with AJAX-heavy stuff, `until.jsReturnsTrue()` can save your sanity.
Pro tip: Log the DOM state before waits to debug why things fail.
Also, maybe give Playwright a spin? It handles waits way better IMO.
