Skip to content

Commit 977c310

Browse files
committed
fixing phantomjs usage on windows for python
Fixes Isssue #6736
1 parent c0fb8f0 commit 977c310

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

py/selenium/webdriver/phantomjs/service.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
16+
import platform
17+
import signal
1618
import subprocess
1719
import time
18-
import signal
1920

2021
from selenium.common.exceptions import WebDriverException
2122
from selenium.webdriver.common import utils
@@ -59,8 +60,8 @@ def start(self):
5960
"""
6061
try:
6162
self.process = subprocess.Popen(self.service_args, stdin=subprocess.PIPE,
62-
close_fds=True, stdout=self._log,
63-
stderr=self._log)
63+
close_fds=platform.system() != 'Windows',
64+
stdout=self._log, stderr=self._log)
6465

6566
except Exception as e:
6667
raise WebDriverException("Unable to start phantomjs with ghostdriver.", e)

0 commit comments

Comments
 (0)