Update the docs

This commit is contained in:
Michael Mintz 2019-06-10 23:11:44 -04:00
parent 116f4b12e3
commit c5a63900a6
2 changed files with 29 additions and 20 deletions

View File

@ -12,9 +12,25 @@ pytest my_first_test.py --demo_mode
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Quick Start:
(<i>Requires **[Python/Pip](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/install_python_pip_git.md)** [<img src="https://img.shields.io/badge/python-2.7,_3.5,_3.6,_3.7-22AADD.svg" alt="Python versions" />](https://www.python.org/downloads/). Optionally, you may want to use a [Python virtual environment](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md) to isolate Python dependencies between projects.</i>)
You'll need **[Python](https://www.python.org/downloads/)** [<img src="https://img.shields.io/badge/python-2.7,_3.5,_3.6,_3.7-22AADD.svg" alt="Python versions" />](https://www.python.org/downloads/)
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Git clone and install SeleniumBase:
Optionally, you may want a [Python virtual environment](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md) to isolate Python dependencies between projects.
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Install/upgrade ``pip``:
With Python installed and on your System PATH, you can get the latest ``pip`` with:
```
python -m easy_install -U pip
```
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Install ``seleniumbase``: [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)
```
pip install seleniumbase
```
* Add ``--upgrade`` to upgrade an existing installation.
* Add ``--force-reinstall`` for a clean install.
You can also install SeleniumBase from a ``git clone``:
```
git clone https://github.com/seleniumbase/SeleniumBase.git
cd SeleniumBase
@ -23,12 +39,6 @@ python setup.py develop
```
* ("``pip install -e .``" also works from the top-level SeleniumBase folder.)
SeleniumBase can also be installed from [PyPI](https://pypi.python.org/pypi/seleniumbase): [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)
```
pip install seleniumbase
```
* (Add ``--upgrade`` to get the latest packages. Add ``--force-reinstall`` with ``--no-cache-dir`` to force a clean installation.)
You can also install a specific GitHub branch of SeleniumBase:
```
pip install git+https://github.com/seleniumbase/SeleniumBase.git@master#egg=seleniumbase
@ -68,8 +78,8 @@ self.update_text("textarea", "text")
```
(<i>You can still use ``self.driver`` in your code.</i>)
#### **Run tests with Pytest or Nose in any browser:**<br />
(<i>Using **Pytest** is strongly recommended</i>)
#### **Run tests with ``pytest`` or ``nose`` in any browser:**<br />
(<i>Using **pytest** is strongly recommended</i>)
```
pytest my_first_test.py --browser=chrome

View File

@ -8,22 +8,21 @@ You can [download Git from here](http://git-scm.com/downloads).
(You can also download SeleniumBase from GitHub without using git-related commands.)
### [Python 2.7 or 3.x](https://www.python.org/downloads/)
### [Python 2.7 or 3.x](https://www.python.org)
#### macOS:
Python should already come preinstalled. You can use both Python 2.7 or Python 3.6+ with SeleniumBase. If you have [Homebrew](https://brew.sh/) installed, you can use: ``brew install python3`` to install Python 3. Or you can just get everything from [https://www.python.org/downloads/](https://www.python.org/downloads/).
The official docs.python-guide.org instructions here: [Installing Python 2 on Mac OS X](https://docs.python-guide.org/starting/install/osx/) and [Installing Python 3 on Mac OS X](https://docs.python-guide.org/starting/install3/osx/#install3-osx). (NOTE: Apple has rebranded OS X as macOS but this has not been reflected in the official docs.python-guide.org instructions yet.)
#### Windows:
You can [download Python 2.7 from here](https://www.python.org/downloads/release/python-2713/) OR [download Python 3.6.6 from here](https://www.python.org/downloads/release/python-366/).
You can download Python from [https://www.python.org/downloads/](https://www.python.org/downloads/) if it's not already preinstalled on your machine.
### [Pip](https://en.wikipedia.org/wiki/Pip_%28package_manager%29)
You might already have pip and setuptools installed, but if you don't:
```bash
python -m easy_install -U pip
pip install -U setuptools
```
If that didn't work, here are some more commands you can try:
On macOS / Windows / Linux, run the following command:
```bash
python -m ensurepip --default-pip