1

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?

charsee
  • 33
  • 4

1 Answers1

0

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.