Typescript SDK Reference
Reference for Typescript SDK
This reference is for the v0.8.0 SDK. Please see here for older versions.
Below is an example of how to use the Runtime SDK to post content on LinkedIn:
Advanced Configuration
Hosting
Anon supports running the automated browser session in a local or managed context. By default, the browser is managed by Anon. If you wish to run it in another environment, there are a few options available.
Remote Browser
You can connect Anon to a Chromium browser using a CDP (Chrome DevTools Protocol) URL.
Proxying
Anon uses proxying to mimic the network behavior of your users. You can disable this, provide your own proxies, or use Anon’s proxies with your own browser instance.
Disable Proxying
Using your own Proxy
Timeouts
A managed browser instance has a finite lifetime. There are two types of timeouts:
-
the permissible amount of time for a page to load (defaults to 30 seconds)
-
the total session lifetime (defaults to 15 minutes)
Both are configurable. Note that a local browser instance can be run indefinitely.
Setting the page timeout:
Setting browser instance lifetime:
Monitoring
Live Session Rendering
Even though our managed instances are headless, you and your users can observe a rendered view of the webpage live.
You can even embed the webpage as an iframe. This can be shared with your users so that they can watch the automations as they happen.
Logs
You can pass in a custom Logger
to the
browser initialization for fine-grained control over logging:
Screenshots
You can plug into the existing Playwright screenshot functionality as follows:
Was this page helpful?