Hi,
Firstly, apologies if I did not include everything I should have as it’s my first time posting.
Elasticsearch, Kibana, Fleet + Elastic Agent versions are all 8.15.1.
It is on-prem version of Elasticstack.
My issue is that I need help on how exactly –playwright-options should be used in the synthetics CLI. Currently, I am trying to use the –playwright-options flag in the synthetics cli to dynamically set device emulation. I would like to set the …device option to a mobile or desktop configuration.
Below is my current command that I am running in my terminal (powershell):
$deviceName="Galaxy A55";`$device='{"...devices["' + $deviceName + '"]}';npx /synthetics . --playwright-options $device
This current command throws an error “SyntaxError: Expected ':' after property name in JSON at position 15 (line 1 column 16)”.
I have also tried this version as my JSON and my tests run but the device doesn’t change to mobile.
$deviceName="Galaxy A55"; $device='{ "device":"' + $deviceName + '"}'; npx /synthetics . --playwright-options $device
I have looked at the docs, in particular this: Configure a Synthetics project | Elastic Docs but it only shows how to set the device emulation in the config file and not in the CLI.
I would appreciate any help or pointers on what I am doing wrong.
Thank you.