Update the docs
This commit is contained in:
parent
2138dfd61e
commit
15a3be88ce
|
@ -60,10 +60,8 @@ Tests are run with "pytest". Browsers are controlled by WebDriver.
|
|||
* [<img src="https://img.shields.io/pypi/pyversions/seleniumbase.svg?color=22AAEE" alt="Python:2.7|3.5|3.6|3.7|3.8" />](https://www.python.org/downloads/)
|
||||
* A [Python virtual env](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/) is recommended. <i><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md">See shortcut</a>.</i>
|
||||
* Upgrade **[pip](https://pypi.org/project/pip/)** to prevent warnings:
|
||||
|
||||
```bash
|
||||
python -m pip install -U pip
|
||||
```
|
||||
-- macOS/Linux: ``python3 -m pip install -U pip``
|
||||
-- Windows(Cmd): ``py -m pip install -U pip``
|
||||
|
||||
<a id="install_seleniumbase"></a>
|
||||
<h2><img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" width="30" /> Install SeleniumBase:</h2>
|
||||
|
@ -315,7 +313,7 @@ SeleniumBase provides additional ``pytest`` command-line options for tests:
|
|||
--agent=STRING # (Modify the web browser's User-Agent string.)
|
||||
--mobile # (Use the mobile device emulator while running tests.)
|
||||
--metrics=STRING # (Set mobile "CSSWidth,CSSHeight,PixelRatio".)
|
||||
--extension-zip=ZIP # (Load a Chrome Extension .zip file, comma-separated.)
|
||||
--extension-zip=ZIP # (Load a Chrome Extension .zip|.crx, comma-separated.)
|
||||
--extension-dir=DIR # (Load a Chrome Extension directory, comma-separated.)
|
||||
--headless # (Run tests headlessly. Default mode on Linux OS.)
|
||||
--headed # (Run tests with a GUI on Linux OS.)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
livereload==2.6.2;python_version>="3.6"
|
||||
pymdown-extensions==8.0
|
||||
mkdocs==1.1.2
|
||||
mkdocs-material==5.5.6
|
||||
mkdocs-material==5.5.7
|
||||
mkdocs-simple-hooks==0.1.1
|
||||
mkdocs-material-extensions==1.0
|
||||
mkdocs-minify-plugin==0.3.0
|
||||
|
|
|
@ -109,7 +109,7 @@ SeleniumBase provides additional ``pytest`` command-line options for tests:
|
|||
--proxy=USERNAME:PASSWORD@SERVER:PORT # (Use authenticated proxy server.)
|
||||
--mobile # (Use the mobile device emulator while running tests.)
|
||||
--metrics=STRING # (Set mobile "CSSWidth,CSSHeight,PixelRatio".)
|
||||
--extension-zip=ZIP # (Load a Chrome Extension .zip file, comma-separated.)
|
||||
--extension-zip=ZIP # (Load a Chrome Extension .zip|.crx, comma-separated.)
|
||||
--extension-dir=DIR # (Load a Chrome Extension directory, comma-separated.)
|
||||
--headless # (Run tests headlessly. Default mode on Linux OS.)
|
||||
--headed # (Run tests with a GUI on Linux OS.)
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
(*Shortcut*: Run "``source virtualenv_install.sh``" from the top-level SeleniumBase folder to perform the following steps.)
|
||||
|
||||
```bash
|
||||
python -m pip install --upgrade virtualenv
|
||||
python -m pip install --upgrade virtualenvwrapper
|
||||
python3 -m pip install pip wheel --force-reinstall
|
||||
python3 -m pip install virtualenvwrapper --force-reinstall
|
||||
export WORKON_HOME=$HOME/.virtualenvs
|
||||
source `which virtualenvwrapper.sh`
|
||||
```
|
||||
|
@ -20,52 +20,81 @@ If you add ``source `which virtualenvwrapper.sh` `` to your local bash file (``~
|
|||
(*Shortcut*: Run "``virtualenv_install.bat``" from the top-level SeleniumBase folder to perform the following steps.)
|
||||
|
||||
```bash
|
||||
python -m pip install --upgrade virtualenvwrapper-win
|
||||
py -m pip install pip wheel --force-reinstall --user
|
||||
py -m pip install virtualenvwrapper-win --force-reinstall --user
|
||||
```
|
||||
|
||||
### Step 2: Create a virtual environment:
|
||||
|
||||
### macOS / Linux / Windows:
|
||||
### macOS / Linux:
|
||||
|
||||
* Using ``mkvirtualenv``:
|
||||
* Using ``mkvirtualenv`` (any version of Python):
|
||||
```bash
|
||||
mkvirtualenv seleniumbase_venv
|
||||
mkvirtualenv sbase_env
|
||||
```
|
||||
(If you have multiple versions of Python installed on your machine, and you want your virtual environment to use a specific Python version, add ``--python=PATH_TO_PYTHON_EXE`` with the Python executable to use.)
|
||||
|
||||
* Using ``virtualenv``:
|
||||
* (Python 2) Using ``virtualenv``:
|
||||
```bash
|
||||
virtualenv seleniumbase_venv
|
||||
source seleniumbase_venv/bin/activate
|
||||
virtualenv sbase_env
|
||||
source sbase_env/bin/activate
|
||||
```
|
||||
|
||||
* (Python 3) Using ``mvenv``:
|
||||
* (Python 3) Using ``python3 -m venv``:
|
||||
```bash
|
||||
python3 -mvenv seleniumbase_venv
|
||||
source seleniumbase_venv/bin/activate
|
||||
python3 -m venv sbase_env
|
||||
source sbase_env/bin/activate
|
||||
```
|
||||
|
||||
### Windows:
|
||||
|
||||
* Using ``mkvirtualenv`` (any version of Python):
|
||||
```bash
|
||||
mkvirtualenv sbase_env
|
||||
```
|
||||
(If you have multiple versions of Python installed on your machine, and you want your virtual environment to use a specific Python version, add ``--python=PATH_TO_PYTHON_EXE`` with the Python executable to use.)
|
||||
|
||||
* (Python 2) Using ``virtualenv``:
|
||||
```bash
|
||||
virtualenv sbase_env
|
||||
call sbase_env\\Scripts\\activate
|
||||
```
|
||||
|
||||
* (Python 3) Using ``py -m venv``:
|
||||
```bash
|
||||
py -m venv sbase_env
|
||||
call sbase_env\\Scripts\\activate
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
If you ever need to leave your virtual environment, use the following command:
|
||||
### mkvirtualenv Commands
|
||||
|
||||
Creating a virtual environment:
|
||||
|
||||
```bash
|
||||
mkvirtualenv sbase_env
|
||||
```
|
||||
|
||||
Leaving your virtual environment:
|
||||
|
||||
```bash
|
||||
deactivate
|
||||
```
|
||||
|
||||
You can always jump back into your virtual environment later:
|
||||
Returning to a virtual environment:
|
||||
|
||||
```bash
|
||||
workon seleniumbase_venv
|
||||
workon sbase_env
|
||||
```
|
||||
|
||||
To list all existing virtual environments:
|
||||
Listing all virtual environments:
|
||||
|
||||
```bash
|
||||
lsvirtualenv
|
||||
```
|
||||
|
||||
To delete a virtual environment:
|
||||
Deleting a virtual environment:
|
||||
|
||||
```bash
|
||||
rmvirtualenv VIRTUAL_ENV_NAME
|
||||
|
|
|
@ -24,7 +24,7 @@ markdown_extensions:
|
|||
# Configuration
|
||||
theme:
|
||||
name: material
|
||||
logo: https://seleniumbase.io/cdn/img/sb_logo_dh.png
|
||||
logo: img/logo3a.png
|
||||
favicon: img/logo3a.png
|
||||
include_homepage_in_sidebar: true
|
||||
sticky_navigation: true
|
||||
|
|
|
@ -30,7 +30,7 @@ def pytest_addoption(parser):
|
|||
--agent=STRING (Modify the web browser's User-Agent string.)
|
||||
--mobile (Use the mobile device emulator while running tests.)
|
||||
--metrics=STRING (Set mobile "CSSWidth,CSSHeight,PixelRatio".)
|
||||
--extension-zip=ZIP (Load a Chrome Extension .zip file, comma-separated.)
|
||||
--extension-zip=ZIP (Load a Chrome Extension .zip|.crx, comma-separated.)
|
||||
--extension-dir=DIR (Load a Chrome Extension directory, comma-separated.)
|
||||
--headless (Run tests headlessly. Default mode on Linux OS.)
|
||||
--headed (Run tests with a GUI on Linux OS.)
|
||||
|
|
|
@ -21,7 +21,7 @@ class SeleniumBrowser(Plugin):
|
|||
--agent=STRING (Modify the web browser's User-Agent string.)
|
||||
--mobile (Use the mobile device emulator while running tests.)
|
||||
--metrics=STRING (Set mobile "CSSWidth,CSSHeight,PixelRatio".)
|
||||
--extension-zip=ZIP (Load a Chrome Extension .zip file, comma-separated.)
|
||||
--extension-zip=ZIP (Load a Chrome Extension .zip|.crx, comma-separated.)
|
||||
--extension-dir=DIR (Load a Chrome Extension directory, comma-separated.)
|
||||
--headless (Run tests headlessly. Default mode on Linux OS.)
|
||||
--headed (Run tests with a GUI on Linux OS.)
|
||||
|
|
Loading…
Reference in New Issue