Skip to content

Commit

Permalink
When running nosetests and the phantom webdriver I saw strange behavi…
Browse files Browse the repository at this point in the history
…or unless I set stdin=subprocess.PIPE,

I believe what was going on is that phantomJS would close STDIN, causing STDIN to be closed in nose, and FD 0 to be reused
for some of the captured I/O in nosetests.

Signed-off-by: Luke Inman-Semerau <luke.semerau@gmail.com>
  • Loading branch information
jaminben authored and lukeis committed Oct 22, 2013
1 parent 9ce29db commit 110407c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions py/selenium/webdriver/phantomjs/service.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ def start(self):
or when it can't connect to the service
"""
try:
self.process = subprocess.Popen(self.service_args,
stdout=self._log, stderr=self._log)
self.process = subprocess.Popen(self.service_args, stdin=subprocess.PIPE,
close_fds=True, stdout=self._log,
stderr=self._log)

except Exception as e:
raise WebDriverException("Unable to start phantomjs with ghostdriver.", e)
count = 0
Expand Down

0 comments on commit 110407c

Please sign in to comment.