Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top