There are 2 options in the Tools:
1) Use a user interface recorder tool that will record mouse movements and user clicks and allow them to be played. (Unfortunately, it seems that the phone simulator does not reveal your accessibility elements to the UI recorder).
2) Simulate interaction with Automation tool in javascript using UIA classes - useful for writing interface tests for an application or modeling user interaction. You can read the introduction about using Automation in this blogpost by Alex Vollmer.
source share