I keep getting TimeoutError with page.wait_for_selector('selector'). The method page.wait_for_load_state() doesn't help either so I am using time.sleep() as an alternative. Is there a way to study which elements of page load and in what order. Is there a method for that?
First, I recommend using page.wait_for_timeout() instead of time.sleep(), second, make sure your selector is correct, the default timeout time is 30 seconds, enough for elements to appear! Use headless=False to monitor if the element is showing.
Playwright: how to test the order in which elements load