What is headless mode in Selenium Python?

What is headless mode in Selenium Python?

Headless mode is a feature of Selenium Python that allows tests to run without a GUI. This allows integration with Continuous Integration (CI) and other continuous processes that require automated tests to run on a schedule.

To enable headless mode, you must set the following Selenium options:

driver = webdriver.PhantomJS()

webdriver.PhantomJS().set_headless(True)