Chrome offers a WebSocket based API they call the Chrome DevTools Protocol. This API is what allows web development tools to build integrations, and tools such as Selenium to perform their automation.