Headless testing, where browsers run without a visible UI, has become popular for server-based test automation
. Selenium 4 improves support for headless testing. For example, it fixes an issue with taking screenshots in headless mode in Firefox. Overall, running tests headlessly is smoother and has fewer glitches. Selenium 3 can also run browsers headlessly but requires more configuration and doesn't have full support across all browsers.