I try 2 options with pyinstaller one with console and one without.
I am using Windows 10, Python 3.5.4, Windows Chrome Driver 2.33 and Selnium 3.6.0 and Pyinstaller
Firstly go to-
C:\Python35\Lib\site-packages\selenium\webdriver\common\service.py
then in def start(self):
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=0x08000000)``
Just add creationflags=0x08000000 , I've already added there in the code. creationflags is a constant. It will work fine.
or,
you might also replace it with creationflags=CREATE_NO_WINDOW and add this line code from win32process import CREATE_NO_WINDOW.
In my case, first method was working.