The best way is to take it source code,as other ways have changed or not working anymore.
root python\Lib\site-packages\selenium\webdriver\common\service.py
In
root python\Lib\site-packages\selenium\webdriver\common\service.py
In
service.py
add creationflags=CREATE_NO_WINDOW
parameter.def start(self): """ Starts the Service. :Exceptions: - WebDriverException : Raised either when it can't start the service or when it can't connect to the service """ try: cmd = [self.path] cmd.extend(self.command_line_args()) self.process = subprocess.Popen(cmd, env=self.env, close_fds=platform.system() != 'Windows', stdout=self.log_file, stderr=self.log_file, stdin=PIPE, creationflags=CREATE_NO_WINDOW) except TypeError: raise