Skip to main content

Capabilities for Playwright Android 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 Android tests.

tip

You can use the Playwright Android Capability Generator to generate capabilities for your tests.

KeyExpected ValuesDescriptionCapability
platformandroidSpecify the platform nameconst capability = { "LT:Options": {"platform": "android",}}
platformVersion12Specify the platform versionconst capability = { "LT:Options": {"platformVersion": "12",}}
deviceNamePixel 5Specify the device name.const capability = { "LT:Options": {"deviceName": "Pixel 5",}}
buildPlaywright Android BuildRepresent the build number for your testconst capability = {"LT:Options": {"build": "<build_name>",}}
namePlaywright Android 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"] }}
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,}}
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",}}

Using REGEX for device name

Regular Expression or REGEX is widely used to make searching/find characters in a string.

When you run a test on LambdaTest using a specific device, there may be scenarios, in which the particular device that you selected isn’t available. In these scenarios, REGEX will help you widen the search request for devices to run the test on.

To quote an example, consider you want to run the test on an Pixel. It doesn’t matter which one, but it’s got to be an Pixel. In these cases, we can use REGEX to specify exactly that. You’ll now be allotted any Pixel device that’s available which widens the search of devices considerably.

Refer REGEX for App/Browser Automation to read more on this.