Reputation: 1139
I'm using phantomJS driver (in python 3.3). I initialize it by
self._phantom = webdriver.PhantomJS('path/to/phantomJS.exe')
And this is OK, console doesn't appear. But when I build the project using cx_freeze to exe file, then the console does appear.
It's not much a problem, but my program opens about 3 windows and dialogs, and another windows (especially console) might be too confusing or distracting for customer.
Thank you for your advice.
Upvotes: 4
Views: 1827
Reputation: 2520
I ran in the same problem and I was able to fix it by patching the selenium python module.
This is the file, I've submitted a patch to the selenium github https://github.com/Lazik/selenium/blob/d790915a1124bd4730f10855c7e0a40ab6e6b59f/py/selenium/webdriver/common/service.py
Overwrite the service.py file you can find it in
your python_install folder\Lib\site-packages\selenium\webdriver\common
Mine is here:
C:\Python33\Lib\site-packages\selenium\webdriver\common
Upvotes: 5