How do I enable automation in Chrome?

How do I enable automation in Chrome?

Chrome was stopped from displaying this notice by sending the “disable-infobars” ChromeOption to the WebDriver. The “disable-infobars” option was recently deprecated, and the notification is no longer removed. The current fix is to use the “excludeSwitches” option and then disable the “enable automation” switch.