playwright_util.py 178 B

123456789101112
  1. """
  2. """
  3. def is_element_present(page, selector):
  4. try:
  5. page.wait_for_selector(selector, timeout=2000)
  6. return True
  7. except Exception:
  8. return False