i am searching for an api which supports record and playback functionalities in java. i saw this feature is available in many test automation tools but i could't get which api they used inorder to store the i.e., record the user actions(automatically the code will generate) and playback the things.

please suggest me which api is there for recording the user actions and playback them

thank you