Update the docs

This commit is contained in:
Michael Mintz 2020-05-06 20:23:28 -04:00
parent 91f5f252af
commit ae91cb0a76
4 changed files with 75 additions and 44 deletions

View File

@ -1,6 +1,6 @@
<h2 align="center"><img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_sb23.png" alt="SeleniumBase" height="48" /></h2>
<h1 align="center"><img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_f6.png" alt="SeleniumBase" /></h1>
<h3 align="center">Create web & mobile tests 8x faster.</h3>
<h3 align="center">Create web/mobile tests 8x faster.</h3>
<p align="center">Extends <a href="https://selenium.dev/">Selenium/WebDriver</a> and <a href="https://docs.pytest.org/en/latest/index.html">pytest</a>.</p>
@ -190,7 +190,7 @@ For a full list of SeleniumBase features, [Click Here](https://github.com/seleni
<a id="detailed_instructions"></a>
<img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_media_logo_c.png" title="SeleniumBase" height="100">
<img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_i.png" title="SeleniumBase" height="48">
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Detailed Instructions:
@ -712,12 +712,10 @@ Additionally, you can use the ``@retry_on_exception()`` decorator to specificall
#### Congratulations on getting started with SeleniumBase!
<i>**Questions?**</i> [![Join the chat at https://gitter.im/seleniumbase/SeleniumBase](https://badges.gitter.im/seleniumbase/SeleniumBase.svg)](https://gitter.im/seleniumbase/SeleniumBase?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br />
**If you see something, say something!**<br />[<img src="https://img.shields.io/github/issues-closed-raw/seleniumbase/SeleniumBase.svg?color=22BB88" alt=" " />](https://github.com/seleniumbase/SeleniumBase/issues?q=is%3Aissue+is%3Aclosed) [<img src="https://img.shields.io/github/issues-pr-closed/seleniumbase/SeleniumBase.svg?logo=github&logoColor=white&color=22BB99">](https://github.com/seleniumbase/SeleniumBase/pulls?q=is%3Apr+is%3Aclosed)
**If you like us, give us a star!**<br />[<img src="https://img.shields.io/github/stars/seleniumbase/seleniumbase.svg?color=888CFA" alt=" " />](https://github.com/seleniumbase/SeleniumBase/stargazers)
[https://github.com/mdmintz](https://github.com/mdmintz)<br />
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_media_logo_c.png" title="SeleniumBase" height="100">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md) <br /> [<img src="https://img.shields.io/badge/license-MIT-22BBCC.svg" alt=" " />](https://github.com/seleniumbase/SeleniumBase/blob/master/LICENSE) [<img src="https://img.shields.io/github/repo-size/seleniumbase/seleniumbase.svg" alt="Size" />](https://github.com/seleniumbase/SeleniumBase/releases)
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_sb23.png" title="SeleniumBase" height="48">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md) <br /> [<img src="https://img.shields.io/badge/license-MIT-22BBCC.svg" alt=" " />](https://github.com/seleniumbase/SeleniumBase/blob/master/LICENSE) [<img src="https://img.shields.io/github/repo-size/seleniumbase/seleniumbase.svg" alt="Size" />](https://github.com/seleniumbase/SeleniumBase/releases) [<img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt="Join the chat!" />](https://gitter.im/seleniumbase/SeleniumBase)

View File

@ -1,4 +1,4 @@
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_i.png" title="SeleniumBase" height="48">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_q.png" title="SeleniumBase" height="48">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
[<img src="http://img.youtube.com/vi/Sjzq9kU5kOw/0.jpg" title="SeleniumBase" height="180">](https://www.youtube.com/watch?v=Sjzq9kU5kOw)
@ -6,31 +6,30 @@
<a id="feature_list"></a>
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> **Features:**
* A complete test automation framework for building & running reliable testing scripts.
* Uses [Pytest](https://docs.pytest.org/en/latest/) or [Nose](http://nose.readthedocs.io/en/latest/) runners for test discovery, organization, execution, and logging.
* Includes [console scripts](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md) that save you time by installing web drivers automatically, etc.
* Includes a [website tour builder](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md) for creating and running walkthroughs on any website.
* Works on multiple platforms such as macOS, Windows, Linux, and [Docker](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/docker/ReadMe.md).
* Uses a [flexible command-line interface](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md) to customize & configure test runs.
* Can run tests using multiple concurrent threads. (Use ``-n THREAD_COUNT``)
* Has Python libraries for helping you do much more with Selenium/WebDriver.
* Has [Plugins](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/plugins) for logging data and screenshots automatically. ([Click to learn more](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md))
* Uses a [global config file](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) for configuring SeleniumBase to your specific needs.
* A complete test automation framework for web/mobile UI testing.
* Uses [pytest](https://docs.pytest.org/en/latest/) and/or [Nose](http://nose.readthedocs.io/en/latest/) for test discovery, execution, and logging.
* Includes powerful [console scripts](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md). Type **``seleniumbase``** to activate.
* Has the ability to translate tests into [multiple spoken languages](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/translations).
* Has a flexible [command-line interface](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md) for customizing test runs.
* Can run tests multithreaded in parallel. (Use ``-n NUM_THREADS``)
* Has [Plugins](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/plugins) for logging data and screenshots. ([Click to learn more](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md))
* Has a [global config file](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) for configuring SeleniumBase as needed.
* Includes a [website tour builder](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md) for creating interactive walkthroughs.
* Backwards-compatible with [WebDriver](http://www.seleniumhq.org/projects/webdriver/). (Use ``self.driver`` anywhere.)
* Can run tests in Headless Mode to hide the web browser. (Use ``--headless``)
* Can run tests through a proxy server. (Use ``--proxy=IP_ADDRESS:PORT``)
* Can use an authenticated proxy server. (``--proxy=USERNAME:PASSWORD@IP_ADDRESS:PORT``)
* Can use an authenticated proxy server. (``--proxy=USER:PASS@IP_ADDRESS:PORT``)
* Can change the web browser's user agent string. (Use ``--agent=USER_AGENT_STRING``)
* Can run tests using Chrome's mobile device emulator (Use ``--mobile``)
* Can set a Chrome User Data Directory / Profile to load. (Use ``--user_data_dir=DIR``)
* Can load Chrome Extension ZIP files (comma-separated). (Use ``--extension_zip=ZIP``)
* Can load Chrome Extension folders (comma-separated). (Use ``--extension_dir=DIR``)
* Can handle Google Authenticator logins by using the [Python one-time password library](https://pyotp.readthedocs.io/en/latest/).
* Includes a hybrid-automation solution called **[MasterQA](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/masterqa/ReadMe.md)** to speed up manual testing.
* Can load Chrome Extension ZIP files. (Use ``--extension_zip=ZIP``)
* Can load Chrome Extension folders. (Use ``--extension_dir=DIR``)
* Can handle Google Authenticator logins with [Python's one-time password library](https://pyotp.readthedocs.io/en/latest/).
* Includes a hybrid-automation solution called [MasterQA](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/masterqa/ReadMe.md) to speed up manual testing.
* Integrates with [MySQL](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/core/testcase_manager.py), [Selenium Grid](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/utilities/selenium_grid), [Azure](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/jenkins/ReadMe.md), [Google Cloud](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/google_cloud/ReadMe.md), [Amazon S3](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/plugins/s3_logging_plugin.py), and [Docker](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/docker/ReadMe.md).
* Has the ability to connect to a [BrowserStack](https://www.browserstack.com/automate#), [Sauce Labs](https://saucelabs.com/products/web-testing/cross-browser-testing), or [TestingBot](https://testingbot.com/features) Selenium Grid.
* Includes a [tool to convert Selenium IDE recordings](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/utilities/selenium_ide) into clean, robust SeleniumBase scripts.
* Can connect to [BrowserStack](https://www.browserstack.com/automate#), [Sauce Labs](https://saucelabs.com/products/web-testing/cross-browser-testing), or [TestingBot](https://testingbot.com/features) Selenium Grids.
* Includes a [tool to convert Selenium IDE recordings](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/utilities/selenium_ide) into simple SeleniumBase scripts.
* Can load and make assertions on PDF files from websites or the local file system.
* Can reuse the same Selenium browser session between tests. (Use: ``--reuse-session``)
* Written in Python, but can also make JavaScript calls. (Use: ``self.execute_script()``)
* Includes useful Python decorators and password obfuscation methods. ([Learn more here](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/common/ReadMe.md))
* Includes useful [Python decorators and password obfuscation methods](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/common/ReadMe.md).

View File

@ -1,26 +1,30 @@
<img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_q.png" title="SeleniumBase" height="48">
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Console Scripts
SeleniumBase console scripts help you get things done more easily, such as installing web drivers, creating a test directory with necessary configuration files, converting old Webdriver unittest scripts into SeleniumBase code, and using the Selenium Grid.
SeleniumBase console scripts help you get things done more easily, such as installing web drivers, creating a test directory with necessary configuration files, converting old WebDriver unittest scripts into SeleniumBase code, translating tests into multiple languages, and using the Selenium Grid.
For running tests from the command line, [use **pytest** with SeleniumBase](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md).
Type ``seleniumbase`` on the command line to get started.
(<i>For running tests, [use **pytest** with SeleniumBase](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md).</i>)
### install
* Usage:
``seleniumbase install [DRIVER_NAME]``
(Drivers: chromedriver, geckodriver, edgedriver,
iedriver, operadriver)
(Drivers: ``chromedriver``, ``geckodriver``, ``edgedriver``,
``iedriver``, ``operadriver``)
* Example:
``seleniumbase install chromedriver``
* Output:
Installs the specified webdriver.
(chromedriver is required for Google Chrome automation)
(geckodriver is required for Mozilla Firefox automation)
(edgedriver is required for Microsoft Edge automation)
(iedriver is required for Internet Explorer automation)
(operadriver is required for Opera Browser automation)
(``chromedriver`` is required for Google Chrome automation)
(``geckodriver`` is required for Mozilla Firefox automation)
(``edgedriver`` is required for Microsoft Edge automation)
(``iedriver`` is required for Internet Explorer automation)
(``operadriver`` is required for Opera Browser automation)
### mkdir
@ -49,10 +53,38 @@ file name while keeping the original file intact.
Works with Katalon Recorder scripts.
See: http://www.katalon.com/automation-recorder
### translate
* Usage:
``seleniumbase translate [SB_FILE].py [LANGUAGE] [ACTION]``
* Languages:
``--en`` / ``--English`` | ``--zh`` / ``--Chinese``
``--nl`` / ``--Dutch`` | ``--fr`` / ``--French``
``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese``
``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese``
``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish``
* Actions:
``-p`` / ``--print`` (Only print output. No changes to files.)
``-o`` / ``--overwrite`` (Overwrite the file being translated)
``-c`` / ``--copy`` (Copy the translation to a new ``.py`` file)
* Output:
Translates a SeleniumBase Python file into the language
specified. Method calls and "import" lines get swapped.
Both a language and an action must be specified.
When running with ``-c`` (or ``--copy``) the new file name
will be the orginal name appended with an underscore
plus the 2-letter language code of the new language.
(Example: Translating ``test_1.py`` into Japanese with
``-c`` will create a new file called ``test_1_ja.py``).
### extract-objects
* Usage:
``seleniumbase extract-objects [SELENIUMBASE_PYTHON_FILE]``
``seleniumbase extract-objects [SB_PYTHON_FILE]``
* Output:
Creates page objects based on selectors found in a
@ -62,7 +94,7 @@ seleniumbase Python file and saves those objects to the
### inject-objects
* Usage:
``seleniumbase inject-objects [SELENIUMBASE_PYTHON_FILE] [OPTIONS]``
``seleniumbase inject-objects [SB_PYTHON_FILE] [OPTIONS]``
* Options:
``-c``, ``--comments`` (Add object selectors to the comments.)
@ -75,7 +107,7 @@ the selected seleniumbase Python file.
### objectify
* Usage:
``seleniumbase objectify [SELENIUMBASE_PYTHON_FILE] [OPTIONS]``
``seleniumbase objectify [SB_PYTHON_FILE] [OPTIONS]``
* Options:
``-c``, ``--comments`` (Add object selectors to the comments.)
@ -90,7 +122,7 @@ have been replaced with variable names defined in
### revert-objects
* Usage:
``seleniumbase revert-objects [SELENIUMBASE_PYTHON_FILE] [OPTIONS]``
``seleniumbase revert-objects [SB_PYTHON_FILE] [OPTIONS]``
* Options:
``-c``, ``--comments`` (Keep existing comments for the lines.)
@ -117,7 +149,7 @@ Downloads the specified item.
### grid-hub
* Usage:
``seleniumbase grid-hub {start|stop|restart}``
``seleniumbase grid-hub {start|stop}``
* Options:
``-v``, ``--verbose`` (Increases verbosity of logging output.)
@ -132,7 +164,7 @@ You can start, restart, or stop the Grid Hub server.
### grid-node
* Usage:
``seleniumbase grid-node {start|stop|restart} [OPTIONS]``
``seleniumbase grid-node {start|stop} [OPTIONS]``
* Options:
``--hub=HUB_IP`` (The Grid Hub IP Address to connect to.) (Default: ``127.0.0.1``)

View File

@ -1,8 +1,10 @@
## The Selenium Grid Hub
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_q.png" title="SeleniumBase" height="48">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> **The Selenium Grid Hub:**
The Selenium Grid Hub lets you distribute tests to run in parallel across multiple node machines. Each node machine can then run its own allocation of tests. This allows you to run a large suite of tests very quickly.
### Running the Selenium Grid Hub
### Running the Selenium Grid Hub:
The following commands will work once you've installed seleniumbase.
@ -14,14 +16,14 @@ seleniumbase download server
#### <img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_box2.png" title="SeleniumBase" height="32"> Grid Hub server controls:
```
seleniumbase grid-hub {start|stop|restart} [OPTIONS]
seleniumbase grid-hub {start|stop} [OPTIONS]
```
Options:
* ``-v``, ``--verbose`` (Increases verbosity of logging output.)
#### <img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_box2.png" title="SeleniumBase" height="32"> Grid node server controls:
```
seleniumbase grid-node {start|stop|restart} --hub=[HUB_IP] [OPTIONS]
seleniumbase grid-node {start|stop} --hub=[HUB_IP] [OPTIONS]
```
Options:
* ``-v``, ``--verbose`` (Increases verbosity of logging output.)