Configure Session Options
Complete reference for all options available when creating a session with the TestMu AI Browser SDK. Use these to control stealth, persistence, browser settings, network, and extensions.
When you call client.sessions.create(), you can pass these options to
configure the session's behavior, browser settings, and capabilities.
Quick Example
Here is a typical create call that sets the most common options:
const session = await client.sessions.create({
adapter: 'playwright',
dimensions: { width: 1920, height: 1080 },
blockAds: true,
stealthConfig: {
humanizeInteractions: true,
randomizeUserAgent: true,
},
proxy: 'http://my-proxy:8080',
lambdatestOptions: {
build: 'my-build',
name: 'my-test',
user: process.env.LT_USERNAME,
accessKey: process.env.LT_ACCESS_KEY,
},
});
The sections below describe every available option in detail.
Required Options
| Option | Type | Description |
|---|---|---|
adapter | 'puppeteer' | 'playwright' | 'selenium' | Which automation library to use |
lambdatestOptions | object | TestMu AI capabilities (build name, test name, credentials) |
Stealth Options
| Option | Type | Default | Description |
|---|---|---|---|
stealthConfig.humanizeInteractions | boolean | false | Add random delays to clicks and typing |
stealthConfig.randomizeUserAgent | boolean | true | Pick random user-agent from pool |
stealthConfig.randomizeViewport | boolean | true | Add ±20px jitter to viewport |
stealthConfig.skipFingerprintInjection | boolean | false | Disable all stealth |