Remove PhantomJS references due to SeleniumHQ dropping support
This commit is contained in:
parent
4361e22250
commit
669c48478e
|
@ -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
|
||||
|
|
11
Dockerfile
11
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"]
|
||||
|
|
|
@ -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
|
||||
```
|
||||
(<i>If no browser is specified, Chrome is used by default.</i>)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 "$@"
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue