const {_android: android} = require('playwright');
const {exec} = require("child_process");
android.devices().then((devices) => {
    devices.forEach((device) => {
        exec("scrcpy -s " + device.serial(), (error, stdout, stderr) => {
            if (error) {
                console.log(`error: ${error.message}`);
                return;
            }
            if (stderr) {
                console.log(`stderr: ${stderr}`);
                return;
            }
            console.log(`stdout: ${stdout}`);
        });
    })

})