Headless Browser

A headless browser is just like any regular browser, the only difference is that headless browser does not have any GUI (Graphical User Interface). When you execute automated test on the headless browser, it does not open any visual window and you cannot see the execution as it does not have any GUI.

Use of Headless Browser

  • A headless browser is mostly used to crawl the sites for data.
  • Headless Browser would be your choice when you want to simulate multiple browsers on the same machine. ‘HtmlUnitDriver‘ class in Selenium allow us to run an automated test using other browser simulators.

Features of Headless Browser

  • Your automated test will run in the background without any visual interruption.
  • A headless browser is faster than normal browsers like Chrome, Firefox etc.
  • Even though it does not have GUI, you can take screenshots using Selenium WebDriver.
  • Selenium support testing in the headless browser using its class ‘HtmlUnitDriver’.

Headless browser behaves like normal browser however it may possible that some features are not supported by the headless browser.  Do required analysis before using it.

« Back to Glossary Index

About Suresh Dubey

I am Suresh Dubey working as an automation test engineer. I am passionate about playing with automation testing and tools. I got a chance to work on Selenium, UFT, PowerShell, Jenkins, CI-CD, Maven, Cucumber, Git etc. I believe in 'Knowledge Sharing'. My mantra for success is 'Learn Something New Everyday'.

View all posts by Suresh Dubey →

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.