Is it possible to simulate a button press on an Android application from another application (Android or Desktop)? I need to automatically click on a specific button on an app. Is there a way to do this on a completely controlled environment?

By controlled environment, I mean the phone could be rooted, it could be connected to a desktop machine, any external app could be installed, and any other requirement.

Note: the button is NOT on an exposed activity.
You can use adb command to simulate touch

adb shell input tap x y

where x y are the co-ordinates of the pixels on the screen to be tapped.