xdotool is not available for Mac but there are plenty of alternatives that runs on macOS with similar functionality. The best Mac alternative is Sikuli, which is both free and Open Source. If that doesn't suit you, our users have ranked more than 50 alternatives to xdotool and 11 are available for Mac so hopefully you can find a suitable replacement. Other interesting Mac alternatives to xdotool are Hammerspoon (Free, Open Source), TextExpander (Paid), Automator (Free) and Typinator (Paid).
With Automator, you can accomplish time-consuming, repetitive manual tasks quickly, efficiently, and effortlessly. Automator lets you skip the complex programming and scripting that is normally required to create automations.
Repeat is a full-fledged, Java mouse/keyboard record/replay and automation hotkeys/macros creation using modern programming languages, and more advanced automation features. Working across three major OSes: Windows, OSX, and Linux.
CodeExpander is a smart feature with TextExpander and embraces the GitHub Gist client. It saves and manages text or script snippets that require repeated input and can be expanded automatically by setting abbreviations.
Autoclickr allows you to automatically click your mouse between 5 and 50 times per second. Whether you're playing an online game that requires repetitive clicking or working on a repetitive task at work, Autoclickr clicks repeatedly so you don't have to.