Migrating to the v2 Node.js SDK
browserbase.$thing$Do()
to browserbase.$thing.$do()
. For example:
load
, loadUrl
, and screenshot
have been fully removed in the v2 SDK. You can use the following example instead that encapsulates the same functionality using Playwright:
create
method on sessions
:
browserbase.getConnectUrl()
to create a new session and retrieve its connect url, or browserbase.getConnectUrl({ sessionId: someSession.id })
to retrieve the connect url for an existing session.
bb.sessions.create()
. Getting the connect url for an existing session is no longer supported.
browserbase.completeSession()
:
REQUEST_RELEASE
:
browserbase.$thing$Do()
to bb.$thing.$do()
.
retryInterval
is no longer supported. You can configure retries with the following syntax on initialization: