By default, when running your Selenium or Playwright tests, they are set to run in headless mode. This is an effective setup as it consumes fewer resources.
Docker-based containers are used if you create a Selenium Grid or Playwright Grid on AWS, GCP, or Azure using Automate Self-Hosted. Headless browsers are only created when test cases are running. When there are no tests, the browsers are stopped, and the machines are stopped as well. This makes it a resource-effective setup.