diff --git a/.travis.yml b/.travis.yml index 7669a78f..901df5c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,11 +15,10 @@ before_script: - "export DISPLAY=:99.0 && sh -e /etc/init.d/xvfb start" - "wget https://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip && unzip chromedriver_linux64.zip && sudo cp chromedriver /usr/local/bin/ && sudo chmod +x /usr/local/bin/chromedriver" - "wget https://github.com/mozilla/geckodriver/releases/download/v0.19.0/geckodriver-v0.19.0-linux64.tar.gz -O /tmp/geckodriver.tar.gz && tar -C /opt -xzf /tmp/geckodriver.tar.gz && sudo chmod 755 /opt/geckodriver && sudo ln -fs /opt/geckodriver /usr/bin/geckodriver && sudo ln -fs /opt/geckodriver /usr/local/bin/geckodriver" - - "wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 && tar -xvf ./phantomjs-2.1.1-linux-x86_64.tar.bz2 && export PATH=$PWD/phantomjs-2.1.1-linux-x86_64/bin:$PATH" + # - "wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 && tar -xvf ./phantomjs-2.1.1-linux-x86_64.tar.bz2 && export PATH=$PWD/phantomjs-2.1.1-linux-x86_64/bin:$PATH" script: - "pytest examples/my_first_test.py --browser=chrome -s" + - "nosetests examples/boilerplates/boilerplate_test.py" - "pytest examples/my_first_test.py --browser=firefox -s" - - "nosetests examples/my_first_test.py --browser=phantomjs" - - "pytest examples/boilerplates/boilerplate_test.py" notifications: email: false diff --git a/Dockerfile b/Dockerfile index 0f9d174d..31fa01d3 100755 --- a/Dockerfile +++ b/Dockerfile @@ -76,11 +76,11 @@ RUN apt-get -qy --no-install-recommends install \ #=================== # Install PhantomJS #=================== -RUN cd /usr/local/share && wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -RUN cd /usr/local/share && tar xjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -RUN ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs -RUN ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs -RUN ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs +# RUN cd /usr/local/share && wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 +# RUN cd /usr/local/share && tar xjf phantomjs-2.1.1-linux-x86_64.tar.bz2 +# RUN ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs +# RUN ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs +# RUN ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs #=========================== # Configure Virtual Display @@ -109,7 +109,6 @@ RUN cd /SeleniumBase && python setup.py develop COPY integrations/docker/docker-entrypoint.sh / COPY integrations/docker/run_docker_test_in_firefox.sh / COPY integrations/docker/run_docker_test_in_chrome.sh / -COPY integrations/docker/run_docker_test_in_phantomjs.sh / RUN chmod +x *.sh COPY integrations/docker/docker_config.cfg /SeleniumBase/examples/ ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/README.md b/README.md index 5b5002ef..fd186be7 100755 --- a/README.md +++ b/README.md @@ -101,8 +101,6 @@ cd examples/ pytest my_first_test.py --browser=chrome nosetests my_first_test.py --browser=firefox - -nosetests my_first_test.py --browser=phantomjs ``` (If no browser is specified, Chrome is used by default.) diff --git a/examples/ReadMe.md b/examples/ReadMe.md index 6a39c84c..4be70982 100755 --- a/examples/ReadMe.md +++ b/examples/ReadMe.md @@ -28,11 +28,6 @@ Run the example test in Firefox: pytest my_first_test.py --browser=firefox ``` -Run the example test in PhantomJS: -```bash -pytest my_first_test.py --browser=phantomjs -``` - Run the example test in Demo Mode (runs slower and adds highlights): ```bash pytest my_first_test.py --browser=chrome --demo_mode @@ -48,11 +43,6 @@ Run the example test suite in Firefox and generate an html report: (nosetests-on nosetests my_test_suite.py --browser=firefox --with-testing_base --report ``` -Run the example test suite in PhantomJS and generate an html report: (nosetests-only) -```bash -nosetests my_test_suite.py --browser=phantomjs --with-testing_base --report -``` - Run a test with configuration specifed by a config file: ```bash nosetests my_first_test.py --config=example_config.cfg diff --git a/help_docs/before_installation.md b/help_docs/before_installation.md index ed63a3e0..9cb40156 100755 --- a/help_docs/before_installation.md +++ b/help_docs/before_installation.md @@ -22,7 +22,7 @@ To run automation on various web browsers, you'll need to download a driver file * For Safari, get [Safari Driver](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/using_safari_driver.md) on your System Path. -* For PhantomJS headless browser automation, get [PhantomJS](http://phantomjs.org/download.html) on your System Path. +* For PhantomJS headless browser automation, get [PhantomJS](http://phantomjs.org/download.html) on your System Path. (NOTE: PhantomJS is no longer officially supported by SeleniumHQ) Mac: diff --git a/help_docs/requirements_installation.md b/help_docs/requirements_installation.md index 4b8fa8d3..5becad06 100755 --- a/help_docs/requirements_installation.md +++ b/help_docs/requirements_installation.md @@ -39,7 +39,7 @@ When done, make sure the location of pip is on your path, which is `$PATH` for M ### [Homebrew](http://brew.sh/) (MAC-ONLY) (OPTIONAL) -The Homebrew package manager allows you to install things more easily on MacOS, such as Git, Chromedriver, and PhantomJS. +The Homebrew package manager allows you to install things more easily on MacOS, such as Git and Chromedriver. Here's the command line script to install Homebrew (*from [https://brew.sh/](https://brew.sh/)*): ```bash diff --git a/integrations/docker/ReadMe.md b/integrations/docker/ReadMe.md index 763e0f8d..13e05e21 100755 --- a/integrations/docker/ReadMe.md +++ b/integrations/docker/ReadMe.md @@ -34,23 +34,19 @@ https://docs.docker.com/engine/installation/ docker run seleniumbase ./run_docker_test_in_firefox.sh -#### 8. Now run the same test with PhantomJS inside your Docker: - - docker run seleniumbase ./run_docker_test_in_phantomjs.sh - -#### 9. You can also enter Docker and stay inside the shell: +#### 8. You can also enter Docker and stay inside the shell: docker run -i -t seleniumbase -#### 10. Now you can run the example test from inside the Docker shell: +#### 9. Now you can run the example test from inside the Docker shell: ./run_docker_test_in_chrome.sh -#### 11. When you're satisfied, you may exit the Docker shell: +#### 10. When you're satisfied, you may exit the Docker shell: exit -#### 12. (Optional) Since Docker images and containers take up a lot of space, you may want to clean up your machine from time to time when they’re not being used: +#### 11. (Optional) Since Docker images and containers take up a lot of space, you may want to clean up your machine from time to time when they’re not being used: Details on that can be found here: http://stackoverflow.com/questions/17236796/how-to-remove-old-docker-containers diff --git a/integrations/docker/run_docker_test_in_phantomjs.sh b/integrations/docker/run_docker_test_in_phantomjs.sh deleted file mode 100755 index 7e903e86..00000000 --- a/integrations/docker/run_docker_test_in_phantomjs.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -e -# Run example test from inside Docker image -echo "Running example SeleniumBase test from Docker with PhantomJS..." -cd /SeleniumBase/examples/ && nosetests my_first_test.py --config=docker_config.cfg --browser=phantomjs -exec "$@" diff --git a/integrations/linux/Linuxfile.sh b/integrations/linux/Linuxfile.sh index 9c2a501d..cb6d91c1 100755 --- a/integrations/linux/Linuxfile.sh +++ b/integrations/linux/Linuxfile.sh @@ -61,12 +61,12 @@ sudo apt-get install -y --force-yes python-dev sudo apt-get install -y --force-yes python-MySQLdb # Install PhantomJS -cd ~ -export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" -sudo wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 -sudo tar xvjf $PHANTOM_JS.tar.bz2 -sudo mv -f $PHANTOM_JS /usr/local/share -sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin +# cd ~ +# export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" +# sudo wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 +# sudo tar xvjf $PHANTOM_JS.tar.bz2 +# sudo mv -f $PHANTOM_JS /usr/local/share +# sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin # Install Chrome cd /tmp