For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content

How to Configure Playwright Capabilities on TestMu AI


When you run Playwright tests on TestMu AI, capabilities tell the cloud grid which browser, version, platform, and test options to use for each session. Setting them correctly gives you control over resolution, network and console logs, video, tunnels, and geolocation across the grid. You define these values as a capabilities object in your Playwright configuration, either by hand or by generating them with the TestMu AI Capability Generator.

The table below lists the capabilities you can configure, the values each one accepts, and a code example for setting it.

KeyExpected ValuesDescriptionCapability
browserNameChrome, Microsoft Edge

Playwright Bundled Browsers: pw-chromium, pw-webkit, and pw-firefox
Specify the browser to test onconst capability = {"browserName": "pw-webkit"}
browserVersionChrome 83 & above, Edge 83 & aboveSpecify the browser version to test onconst capability = {"browserVersion": "latest"}
platformWindows: 11, 10, 8, 8.1, 7

macOS: Monterey, Big Sur, Catiline, Mojave
Specify the platform nameconst capability = { "LT:Options": {"platform": "Windows 10",}}
buildPlaywright Sample BuildRepresent the build number for your testconst capability = {"LT:Options": {"build": "<build_name>",}}
namePlaywright Sample TestRepresents the name of a testconst capability = {"LT:Options": {"name": "<test_name>",}}
projectNamePlaywright Sample ProjectRepresents the name of a projectconst capability = {"LT:Options": {"projectName": "<project_name>",}}
tags["tag1", "tag2", "tag3"]Group your Playwright testsconst capability = {"LT:Options": { "tags": ["tag1", "tag2", "tag3"], }}
buildTags["build1", "build2","build3"]Group your Playwright buildsconst capability = {"LT:Options": { "buildTags": ["build1", "build2", "build3"] }}
resolutionString, Default value: 1920x1080

Windows 11 & 10: 1024x768, 1280x800, 1280x1024, 1366x768, 1440x900, 1680x1050, 1600x1200, 1920x1200, 1920x1080 and 2048x1536

macOS: 1024x768, 1280x960, 1280x1024, 1600x1200 and 1920x1080
Specifying your desktop resolution before initiating the testconst capabilities = { "LT:Options": {"resolution": "2048x1536",}}
projectNameMy TestRepresent the name of your projectconst capability = { "LT:Options": {"projectName": "<project_name>",}}
networktrue/falseEnable network logsconst capability = { "LT:Options": {"network": true,}}
consoletrue/falseEnable browser console logsconst capabilities = { "LT:Options": {"console": true,}}
videotrue/falseEnable video recording of the entire screenconst capability = { "LT:Options": {"video": true,}}
visualtrue/falseCaptures screenshot for every commandconst capability = { "LT:Options": {"visual": true,}}
tunneltrue/falseEnable the tunnel to test locally hosted or privately hosted pagesconst capability = { "LT:Options": {"tunnel": true,}}
tunnelNameString (optional)Identify a specific tunnel instance when you run more than one tunnelconst capability = { "LT:Options": {"tunnelName": "<tunnel_name>",}}
geoLocationAR (Argentina)Specify country codeconst capability = { "LT:Options": {"geoLocation": "AR",}}
idleTimeoutnumberSpecifies the timeout of the commands in seconds.

Default value: 300

Max value: 1800

If a value greater than 1800 is added, idleTimeout will be set to 1800.
const capability = { "LT:Options": {"idleTimeout": "<number>",}}
lambdaMaskCommandsarray sendType or sendFill Masks the type method of the ElementHandle and Locator class.

sendPress Masks the press method of the ElementHandle and Locator class.

setHTTPCredentials Masks the HTTP credentials parameter in the newContext and newPage method of the browser class.

setStorageState Masks the storage state parameter in the newContext and newPage method of the browser class

setGeolocation Masks the Geolocation parameter in the newContext and newPage method of the browser class.
const capability = { "LT:Options": {'lambdaMaskCommands': ["sendType", "sendFill", "sendPress", "setHTTPCredentials", "setStorageState", "setGeolocation"]}}

useSpecificBundleVersionBooleanIf set true: TestMu AI will select the playwright server version as per the browser version you have passed in the capabilities. Check the supported browser version list.

If the value set in the browser version capability is supported by multiple Playwright versions, TestMu AI checks your Playwright client version and sets the Playwright version accordingly.


If set false : TestMu AI will run your playwright tests with the same version as setup in your local system and the browser version will also be used the compatible one as per the supported browser version list and not your defined one.
const capability = { "LT:Options": {"useSpecificBundleVersion": true,}}
lambdaSetBrowserPositionThe lambdaSetBrowserPosition function is designed to arrange two browser windows on the screen, ensuring each occupies exactly half of the available screen space. This layout facilitates side-by-side browser comparisons or multitasking workflows.

OS Supported - Windows

Browsers supported : Chrome, Microsoft Edge , pw-chroium, pw-webkit & pw-firefox
const capability = {action: 'lambdaSetBrowserPosition',}

Continue with the guides below to run and stabilize your Playwright tests on TestMu AI.

Help and Support

Related Articles