Not all tasks in actions can be recorded directly. For example, you can’t record commands in the Effects and View menus, commands that display or hide panels, and use of the Selection, Pen, Paintbrush, Pencil, Gradient, Mesh, Eyedropper, Live Paint Bucket, and Scissors tools.
To tell which tasks cannot be recorded, watch the Actions panel. If the name of the command or tool doesn’t appear after you perform the task, you may still be able to add the task using commands in the Actions panel menu.