Waits for DOM mutations to settle. This helper uses a MutationObserver to monitor DOM changes and waits until the DOM has been stable (no mutations) for the specified settle_duration.
Playwright Page or Locator object to monitor for DOM changes. Can be passed as positional or keyword argument. Use Page to monitor entire document, or Locator to watch specific element.
Maximum seconds to wait for DOM to settle before raising an error. Defaults to 30.0.
Waits for DOM mutations to settle. This helper uses a MutationObserver to monitor DOM changes and waits until the DOM has been stable (no mutations) for the specified settle_duration.
Maximum seconds to wait for DOM to settle before raising an error. Defaults to 30.0.
Waits for DOM mutations to settle. This helper uses a MutationObserver to monitor DOM changes and waits until the DOM has been stable (no mutations) for the specified settle_duration.
from typing import TypedDictfrom playwright.async_api import Pagefrom intuned_browser import wait_for_dom_settledclass Params(TypedDict): passasync def automation(page: Page, params: Params, **_kwargs): await page.goto("https://sandbox.intuned.dev/load-more") # Decorator without arguments (uses settle_duration=0.5, timeout_s=30.0) @wait_for_dom_settled async def load_more_content(page): await page.locator("main main button").click() # Automatically waits for DOM to settle after clicking await load_more_content(page) # DOM has settled, new content is loaded