What if I want to run the test on certain brand of device like Samsung but want LambdaTest to choose the device randomly from any of the Samsung devices?
Hey Matthew!
To pick the device randomly from any of the Samsung devices, you can make use of the regex in the device name capability “.*” - any character being repeated “n” times.
Example - (“Samsung.*”) will fetch you any Samsung device from our inventory.
Comma separated - If multiple device regex are passed, they will be defined as comma-separated values.
Example - (“Pixel.","Galaxy S.”) will fetch you any Pixel or Galaxy S model device.
“[]” - Special characters in device name such as “Galaxy Note 10+” will be handled in the regex by using square brackets.
Example - “Galaxy Note 10[+]” will fetch you Galaxy Note 10+ device.
“[]” - Multiple values passed using only a single character.
Example - “Pixel [3456]” will fetch you any of Pixel 3, Pixel 3a, Pixel 4, Pixel 5, Pixel 6, Pixel 6 Pro.
“$” - If user is passing multiple values (commas separated), $ will end the substring.
Example - “Pixel 6$” will fetch only Pixel 6 device. “Pixel [36]$” will fetch only between Pixel 3 and Pixel 6