Simulate button click on child devices

I got it by using :

for (device in getChildDevices())
    {
mymodule(device)
}

Thanks