code: def headless(self, value):
          
          if value is True:
              self._arguments.append('-headless')
          elif '-headless' in self._arguments:
              self._arguments.remove('-headless')
docs: Sets the headless argument
  
          Args:
            value: boolean value indicating to set the headless option