Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PhantomJS to list of possible nodes. #38

Closed
wants to merge 4 commits into from

Conversation

proteus-aholt
Copy link

Added NodePhantomJS, which includes Dockerfile and entry point script for running PhantomJS as a node within docker.

@proteus-aholt
Copy link
Author

Note: When running tests on PhantomJS using selenium grid, always clear out all cookies between tests, before starting a test, or as part of test cleanup. This is due to a known issue with PhantomJS https://github.com/detro/ghostdriver/issues/170

Example: As part of my wrapped "close driver" method for test cleanup, I simply added this line before calling the quit() method on the driver: getBaseDriver().manage().deleteAllCookies();

@@ -0,0 +1,41 @@
FROM selenium/base:2.44.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you chose to derive from base and not node-base? For example both the Chrome and Firefox nodes derive from node-base: https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeChrome/Dockerfile#L1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That base image takes care of about half of this dockerfile

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A large chunk of this dockerfile is similar to the node-base dockerfile, save for one difference.

I chose to derive from base rather than node-base because neither VNC nor Xvfb are needed by a phantomjs node. It is already headless, so there would really be no graphical view or reason to VNC into that node.

Also: As a result, the PhantomJS node image is much smaller than the node-chrome or node-firefox images are.

@LouTerrailloune
Copy link

@aholtventuretech Why do you use v1.9.8 and not 2.0 ? Lack of precompiled binaries ?

@ghost
Copy link

ghost commented May 27, 2015

I tried this pull request and it did not work for me, the container does not start up. Any one else have better luck?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants