Skip to content

playwriter@0.14.0

Latest

Choose a tag to compare

@remorses remorses released this 04 Dec 22:11
· 3 commits to main since this release
  1. handoff cards always have a Done button, and Done is how the agent resumes: handoff drops the manual option and waitForHandoff drops until. waitForHandoff returns when the user presses Done and throws when they close the card. It no longer polls the page, so check the page yourself after it returns.

    const { link } = await handoff({ page: state.page, message: 'Sign in to Discord with your own account.' })
    // send the link in chat, then wait in a background execute with a long --timeout
    await waitForHandoff({ page: state.page }) // returns on Done, throws on close

    Done and close both fade the card out right away, even when no waitForHandoff is running, and the card no longer comes back after a navigation. A waitForHandoff started after the click returns (Done) or throws (close) at once. The skill now tells agents to send the link first and wait only in the background, so the user always sees the link.

  2. Warning for long fixed waits, and faster scraping in the skill: execute prints a [WARNING] when waitForTimeout() calls in one call add up to more than 3s, with the waits to use instead. The skill teaches waiting for text on unknown pages (page.waitForFunction, getByText(regex).waitFor()), Promise.all([page.waitForResponse(...), click()]) around clicks, reading shop data from the site's own JSON (Shopify /cart.js, WooCommerce Store API), and running known flows in one call with parallel tabs.