Comment by hackgician

Comment by hackgician 9 days ago

9 replies

Interesting, thanks for the feedback! By "taking the place of Playwright," we don't mean the AI itself is going to replace Playwright. Rather, you can continue to use existing Playwright code with new AI functionalities. In addition, we don't really intend for Stagehand to be used in a test suite (though you could!).

Rather, we want Stagehand to assist people who want to build web agents. For example, I was using headless browsers earlier in 2024 to do real-time RAG on e-commerce websites that could aggregate results for vibes-based search queries. These sites might have random DOM changes over time that make it hard to write sustainable DOM selectors, or annoying pop-ups that are hard to deterministically code against.

This is the perfect use for Stagehand! If you're doing QA on your own site, then base Playwright (as you mention) is likely the better solution

andrewmcwatters 9 days ago

It seems to me like Selenium would have been a more appropriate API to extend from, then. Playwright, despite whatever people want it to be otherwise, is explicitly positioned for testing, first.

People in the browser automation space consistently ignore this, for whatever reason. Though, it's right on their site in black and white.

  • hackgician 9 days ago

    Appreciate the feedback. Our take is that Playwright is an open-sourced library with a lot of built-in features that make building with it a lot easier, so it's definitely an easier starting point for us

    • andrewmcwatters 9 days ago

      That's the same reason everyone else ignores the fact that it's a testing library. Except now you're forcing users to write kludges that wrap around the testing interface.

    • mrbluecoat 8 days ago

      Working with Selenium has always been painful for me so I for one thank you for providing an alternate solution.

cjonas 9 days ago

How do you get by when every major sites starts blocking headless browsers? A good example right now is Zillow, but I foresee a world where big chunks of the internet are behind captcha and bot detection

  • andrewmcwatters 9 days ago

    That's not really a problem for Stagehand. It's a problem for Selenium, Playwright, Puppeteer and others at the browser automation library level.

    • cjonas 8 days ago

      it's not really a problem for Playwrite, because Playwrite is really intended to be run by the owners of the website, not as a webscraper.

      It may become a real problem for the usefulness of this style of LLM driven browsing.

      • andrewmcwatters 8 days ago

        Right, but I mean it's a plugin issue outside of Stagehand. That's currently how the space treats the issue.

        There are plugins that extend the major browser automation libraries to do this sort of thing.

        And undetectable browser automation doesn't use Playwright, Puppeteer, or Selenium at all.