Skip to main content

Capabilities for Playwright Testing


The LambdaTest Capability Generator allows you to automatically create the capabilities class needed to run your Playwright automation scripts on LambdaTest. Here are a few capabilities that you can configure to run your Playwright tests.

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 tunnel for local testingconst capability = { "LT:Options": {"tunnel": true,}}
tunnelNametrue /falseSpecify tunnel nameconst 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>",}}