How to store Device ID(Name) of DUT as a parameter for test scripts

I want to call camera function in test script based on selected device at run time.
Reason - Capturing Image in different phone has different steps, so i want to call device specific camera function in my script.

Hi,

I am looking for similar solution. Do you have any working solution that you could share?

Thank you
Arun

Found solution, below code will get the device Name

def dev = RunConfiguration.getExecutionProperties().drivers.system.Mobile.deviceName.toLowerCase()
println dev

1 Like

Thank you @Arun_Damodaran. I was looking for a solution to get deviceID and your solution helped me.

def myDeviceId = RunConfiguration.getExecutionProperties().drivers.system.Mobile.deviceId.toLowerCase()

1 Like