Code Monkey home page Code Monkey logo

phantomjsenv's Introduction

PhantomJsEnv

This is a Docker Image with PhantomJS headless browser installed. PhantomJsEnv was created to run Selenium tests on PhantomJs wihtout installing NodeJS and PhantomJS. PhantomJs is executed inside a container in ghostrdirver mode and connected from a host machine.

Installation

Grab prepacked image from a Docker Hub

docker pull davert/phantomjs-env

Or build image by yourself. Just clone this repo and run

docker build -t phantomjs-env .

Usage

PhantomJsEnv is able to connect to local or remote web sites.

Accessing Remote Website

Run the container and bind it to default Webdriver port 4444

docker run -i -t -p 4444:4444 davert/phantomjs-env 

Accessing Local Website by Port

In case you want to access local website from container you can do the following: if application is run on localhost (0.0.0.0) on a specific port, you can pass APP_PORT environment variable into it:

php -S 0.0.0.0:8000 & 
docker run -i -t -p 4444:4444 -e APP_PORT=8000 davert/phantomjs-env 

Accessing Local Website by Host

In case local web site is served by nginx or Apache, and is configured for a specific host, you can pass host name as environment variable:

docker run -i -t -p 4444:4444 -e APP_HOST=myapp davert/phantomjs-env 

Accessing Site with self-signed certificate

If you want to test site in local environment without proper SSL certificate, you can pass APP_ANY_PROTOCOL setting as environment variable:

docker run -i -t -p 4444:4444 -e APP_ANY_PROTOCOL=true davert/phantomjs-env 

phantomjsenv's People

Contributors

davertmik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.