Skip to content
This repository was archived by the owner on Jul 20, 2025. It is now read-only.

Conversation

@spake
Copy link

@spake spake commented Dec 10, 2013

There is an issue with the use of the latest version of Selenium with PhantomJS & GhostDriver in that Selenium was recently changed to use keep-alive for remote connections, now assuming that the WebDriver connection supports keep-alive and that it can leave the socket open. Unfortunately, by default, keep-alive is disabled in PhantomJS, creating an issue when the two are used together in which GhostDriver closes the HTTP connection while Selenium has requested it remain open.

I've developed a fix in the form of adding a command line argument to PhantomJS that enables keep-alive in GhostDriver. This is the first part of that fix in the form of adding a keepAlive option to GhostDriver that can be called from PhantomJS based on the value of the command line argument.

I assume the protocol would be to get this merged to ghostdriver/master, wait for the changes to be added to the PhantomJS repo, and then submit a pull request on the PhantomJS repo for the changes involving the command line argument. Any clarification on the process would be appreciated 😄

@maestrofjp
Copy link

+1 on this pull request as it is a blocker for us using Selenium, GhostDriver and PhantomJS in our Django test suites. Now having to fall back on Firefox. ;-(

@detro
Copy link
Owner

detro commented Dec 30, 2013

Looking into this now...

detro added a commit that referenced this pull request Dec 30, 2013
Added `keepAlive` capability.
@detro detro merged commit 04fa6c0 into detro:master Dec 30, 2013
@detro
Copy link
Owner

detro commented Dec 30, 2013

I have removed the capability as this is not necessary: enabling support for "keep alive" doesn't force it to the RemoteWebDriver clients.

@spake spake deleted the keepalive branch December 30, 2013 22:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants