Update the docs

This commit is contained in:
Michael Mintz 2020-05-16 15:56:34 -04:00
parent fae0e8f7c1
commit 327d8fbc64
7 changed files with 44 additions and 30 deletions

View File

@ -1,8 +1,8 @@
<meta property="og:title" content="SeleniumBase - Test Automation Framework" />
<meta property="og:description" content="Create browser tests for web and mobile user interfaces." />
<meta property="og:image" content="https://cdn2.hubspot.net/hubfs/100006/images/blue_logo_7.png" />
<meta property="og:image" content="https://seleniumbase.io/img/sb_logo_7.png" />
<link rel="icon" href="https://seleniumbase.io/img/logo3a.png">
<h2 align="center"><a align="center" href="https://github.com/seleniumbase/SeleniumBase/"><img align="center" src="https://cdn2.hubspot.net/hubfs/100006/images/blue_logo_7_btn.png" alt="SeleniumBase" height="170"></a></h2>
<h2 align="center"><a align="center" href="https://github.com/seleniumbase/SeleniumBase/"><img align="center" src="https://seleniumbase.io/img/sb_logo_7.png" alt="SeleniumBase" height="156"></a></h2>
<p align="center">
<a href="https://github.com/seleniumbase/SeleniumBase/releases">
@ -14,8 +14,8 @@
</p>
<p align="center">
<div align="center"><span align="center"><b>Create web and mobile UI tests, fast!</b></span></div>
<div align="center"><span align="center"><b>Take <a href="https://selenium.dev/">Selenium</a> & <a href="https://docs.pytest.org/en/latest/index.html">pytest</a> to new levels.</b></span></div>
<div align="center"><span align="center"><b>Create web/mobile tests with Python.</b></span></div>
<div align="center"><span align="center"><b>Do much more with Selenium/pytest.</b></span></div>
</p>
<p align="center">
@ -56,7 +56,7 @@ pytest test_swag_labs.py --demo
```
<a id="python_installation"></a>
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32" /> Get Started
## <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Get Started
* Requires **[Python](https://www.python.org/downloads/)** and **[Git](https://git-scm.com/)**
* [<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/)
@ -67,7 +67,7 @@ python -m pip install -U pip
```
<a id="install_seleniumbase"></a>
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32"> Install ``seleniumbase``:
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Install ``seleniumbase``:
```bash
git clone https://github.com/seleniumbase/SeleniumBase.git
cd SeleniumBase/
@ -83,7 +83,7 @@ pip install seleniumbase
* Add ``--upgrade`` OR ``-U`` to upgrade an installation.
* Add ``--force-reinstall`` to also upgrade dependencies.
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32" /> Download a webdriver:
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Download a webdriver:
SeleniumBase can download a webdriver to the [seleniumbase/drivers](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/drivers) folder with the ``install`` command:
```bash
@ -95,7 +95,7 @@ seleniumbase install chromedriver
seleniumbase install chromedriver latest
```
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32"> Run a test on Chrome:
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Run a test on Chrome:
```bash
cd examples/
pytest my_first_test.py
@ -154,7 +154,7 @@ self.save_screenshot(FILE_NAME) # Save a screenshot of the current page
```
For the complete list of SeleniumBase methods, see: <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">Method Summary</a></b>
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32"> Learn More:
## <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Learn More:
#### Automatic WebDriver abilities:
SeleniumBase automatically handles common WebDriver actions such as spinning up web browsers and saving screenshots during test failures. (<i><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">Read more about customizing test runs</a>.</i>)
@ -203,7 +203,7 @@ For a full list of SeleniumBase features, <a href="https://github.com/seleniumba
<a id="detailed_instructions"></a>
<img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_sb.png" title="SeleniumBase" height="48">
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32" /> Detailed Instructions:
## <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Detailed Instructions:
**Here's how to run the example script on various web browsers:**
@ -337,7 +337,7 @@ To pass additional data from the command-line to tests, add ``--data="ANY STRING
Now inside your tests, you can use ``self.data`` to access that.
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32"> **Test Directory Customization:**
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Test Directory Customization:
For running tests outside of the SeleniumBase repo with **Pytest**, you'll want a copy of **[pytest.ini](https://github.com/seleniumbase/SeleniumBase/blob/master/pytest.ini)** on the root folder. For running tests outside of the SeleniumBase repo with **Nosetests**, you'll want a copy of **[setup.cfg](https://github.com/seleniumbase/SeleniumBase/blob/master/setup.cfg)** on the root folder. (Subfolders should include a blank ``__init__.py`` file.) These files specify default configuration details for tests. (For nosetest runs, you can also specify a .cfg file by using ``--config``. Example ``nosetests [MY_TEST].py --config=[MY_CONFIG].cfg``)
@ -349,7 +349,7 @@ pytest my_first_test.py
```
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32"> **Logging / Results from Failing Tests:**
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Logging / Results from Failing Tests:
Let's try an example of a test that fails:
```python
@ -372,7 +372,7 @@ You'll notice that a logs folder, "latest_logs", was created to hold information
<a id="creating_visual_reports"></a>
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32"> **Creating Visual Test Suite Reports:**
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Creating Visual Test Suite Reports:
(NOTE: Several command-line args are different for Pytest vs Nosetests)
@ -401,7 +401,7 @@ nosetests test_suite.py --report
(NOTE: You can add ``--show-report`` to immediately display Nosetest reports after the test suite completes. Only use ``--show-report`` when running tests locally because it pauses the test run.)
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32" />Using a Proxy Server:
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Using a Proxy Server:
If you wish to use a proxy server for your browser tests (Chrome and Firefox only), you can add ``--proxy=IP_ADDRESS:PORT`` as an argument on the command-line.
```bash
@ -419,7 +419,7 @@ pytest proxy_test.py --proxy=proxy1
```
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32">Changing the User-Agent:
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Changing the User-Agent:
If you wish to change the User-Agent for your browser tests (Chrome and Firefox only), you can add ``--agent="USER AGENT STRING"`` as an argument on the command-line.
```bash
@ -427,14 +427,14 @@ pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1
```
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32">Building Guided Tours for Websites:
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Building Guided Tours for Websites:
Learn about <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md">SeleniumBase Interactive Walkthroughs</a> (in the ``examples/tour_examples`` folder). It's great for prototyping a website onboarding experience.
<img src="https://cdn2.hubspot.net/hubfs/100006/google_tour_3.gif" title="SeleniumBase Tour of Google" />
<a id="utilizing_advanced_features"></a>
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32">Production Environments & Integrations:
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Production Environments & Integrations:
Here are some things you can do to setup a production environment for your testing:
@ -456,7 +456,7 @@ pytest [YOUR_TEST_FILE].py --with-db-reporting --with-s3-logging
<img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_media_logo_c.png" title="SeleniumBase" height="100" />
<a id="detailed_method_specifications"></a>
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32">Detailed Method Specifications and Examples:
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Detailed Method Specifications and Examples:
#### Navigating to a web page (and related commands)
@ -722,7 +722,7 @@ pytest --reruns 5 --reruns-delay 1
Additionally, you can use the ``@retry_on_exception()`` decorator to specifically retry failing methods. (First import: ``from seleniumbase import decorators``) To learn more about SeleniumBase decorators, [click here](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/common).
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3.png" title="SeleniumBase" height="32"> Wrap-Up
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Wrap-Up
#### Congratulations on getting started with SeleniumBase!

BIN
docs/img/sb_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

BIN
docs/img/sb_logo_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -2,7 +2,7 @@
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Automated Visual Regression Testing
[<img src="http://img.youtube.com/vi/erwkoiDeNzA/0.jpg" title="Automated Visual Regression Testing" height="180">](https://www.youtube.com/watch?v=erwkoiDeNzA)
[<img src="https://img.youtube.com/vi/erwkoiDeNzA/0.jpg" title="Automated Visual Regression Testing" height="180">](https://www.youtube.com/watch?v=erwkoiDeNzA)
(**[Watch the tutorial on YouTube](https://www.youtube.com/watch?v=erwkoiDeNzA)**)
Automated Visual Regression Testing helps you detect when the layout of a web page has changed. Rather than comparing screenshots, layout differences are detected by comparing HTML tags and attributes with a baseline. If a change is detected, it could mean that something broke, the web page was redesigned, or dynamic content changed.

13
help_docs/thank_you.md Executable file
View File

@ -0,0 +1,13 @@
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_sb.png" title="SeleniumBase" height="48">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
## <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" height="30" /> Thank You!
<p><div><b>Thank you for choosing SeleniumBase!</b></div></p>
<p><div><a align="center" href="https://github.com/seleniumbase/SeleniumBase/"><img align="center" src="https://seleniumbase.io/img/sb_logo_7.png" alt="SeleniumBase" height="156"></a></div></p>
<p><div><span><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_github.svg" title="SeleniumBase on GitHub" alt="SeleniumBase on GitHub" height="60" /></a></span>
<span><a href="https://gitter.im/seleniumbase/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_gitter.svg" title="SeleniumBase on Gitter" alt="SeleniumBase on Gitter" height="60" /></a></span>
<span><a href="https://twitter.com/seleniumbase"><img src="https://seleniumbase.io/img/social/share_twitter.svg" title="SeleniumBase on Twitter" alt="SeleniumBase on Twitter" height="60" /></a></span>
<span><a href="https://instagram.com/seleniumbase"><img src="https://seleniumbase.io/img/social/share_instagram.svg" title="SeleniumBase on Instagram" alt="SeleniumBase on Instagram" height="60" /></a></span>
<span><a href="https://www.facebook.com/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_facebook.svg" title="SeleniumBase on Facebook" alt="SeleniumBase on Facebook" height="60" /></a></span></div></p>

View File

@ -1,6 +1,6 @@
### Building a browser-based test automation server on the [Google Cloud Platform](https://cloud.google.com/) by using [SeleniumBase](https://github.com/seleniumbase/SeleniumBase)
(This tutorial, [from a previous Google Cloud Meetup](http://www.meetup.com/Boston-Google-Cloud-Meetup/events/230839686/?showDescription=true), will teach you how to setup a Linux server for running automated browser tests. The cost of running this server is about [$13.61/month on Google Cloud](https://console.cloud.google.com/launcher/details/bitnami-launchpad/jenkins) (enough to handle **5 parallel tests**). This is less expensive than using competitors such as [BrowserStack](https://www.browserstack.com/pricing) or [Sauce Labs](https://saucelabs.com/pricing).)
(This tutorial, [from a previous Google Cloud Meetup](https://www.meetup.com/Boston-Google-Cloud-Meetup/events/230839686/?showDescription=true), will teach you how to setup a Linux server for running automated browser tests. The cost of running this server is about [$13.61/month on Google Cloud](https://console.cloud.google.com/launcher/details/bitnami-launchpad/jenkins) (enough to handle **5 parallel tests**). This is less expensive than using competitors such as [BrowserStack](https://www.browserstack.com/pricing) or [Sauce Labs](https://saucelabs.com/pricing).)
#### Step 1. Open the Google Cloud Platform Cloud Launcher
@ -9,7 +9,7 @@
#### Step 2. Launch a Jenkins instance
![](http://cdn2.hubspot.net/hubfs/100006/images/gcp_cloud_launcher_jenkins_3.png "Finding Jenkins")
![](https://cdn2.hubspot.net/hubfs/100006/images/gcp_cloud_launcher_jenkins_3.png "Finding Jenkins")
* Under "Cloud Launcher", Click on "Jenkins Certified by Bitnami"
* Click on "Launch on Compute Engine"
@ -19,7 +19,7 @@
#### Step 3. Connect with your new Jenkins instance
![](http://cdn2.hubspot.net/hubfs/100006/images/gcp_ssh.png "SSH into your Jenkins instance")
![](https://cdn2.hubspot.net/hubfs/100006/images/gcp_ssh.png "SSH into your Jenkins instance")
* SSH into your new instance by selecting: "SSH" => "Open in browser window" from the instance page.
@ -81,7 +81,7 @@ sudo python setup.py develop
#### Step 13. Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) in Chrome to verify installation (May take up to 10 seconds)
![](http://cdn2.hubspot.net/hubfs/100006/images/gcp_bitnami.png "Linux SSH Terminal")
![](https://cdn2.hubspot.net/hubfs/100006/images/gcp_bitnami.png "Linux SSH Terminal")
```bash
pytest examples/my_first_test.py --headless --browser=chrome
@ -105,7 +105,7 @@ nosetests examples/my_first_test.py --headless --browser=firefox
#### Step 17. Create a new Jenkins job
![](http://cdn2.hubspot.net/hubfs/100006/images/gcp_jenkins_new_job_2.png "Create a Jenkins job")
![](https://cdn2.hubspot.net/hubfs/100006/images/gcp_jenkins_new_job_2.png "Create a Jenkins job")
* Click on "New Item"
* Give your new Jenkins job a name (ex: "My_First_Test")
@ -138,7 +138,7 @@ If you have a web application that you want to test, you'll be able to create Se
#### Step 21. Return to the Google Cloud Launcher and launch a MySQL Instance
![](http://cdn2.hubspot.net/hubfs/100006/images/gcp_mysql.png "Finding MySQL")
![](https://cdn2.hubspot.net/hubfs/100006/images/gcp_mysql.png "Finding MySQL")
* Under "Featured Solutions", Click on "MySQL"
* Click on "Launch on Compute Engine"
@ -156,7 +156,7 @@ If you have a web application that you want to test, you'll be able to create Se
#### Step 23. Get a MySQL GUI tool so that you can connect to your MySQL Instance
* You can download [MySQL Workbench](http://dev.mysql.com/downloads/tools/workbench/) for this.
* You can download [MySQL Workbench](https://dev.mysql.com/downloads/tools/workbench/) for this.
#### Step 24. Create a new connection to your MySQL Instance

View File

@ -29,7 +29,6 @@ theme:
name: material
logo: img/logo3a.png
favicon: img/logo3a.png
language: en
include_homepage_in_sidebar: true
sticky_navigation: true
features:
@ -44,7 +43,7 @@ plugins:
on_pre_build: docs.prepare:main
# Page tree
nav:
- Home Page: README.md
- SeleniumBase Docs: README.md
- Features: help_docs/features_list.md
- CMD Options: help_docs/customizing_test_runs.md
- Python Setup:
@ -73,10 +72,12 @@ nav:
- Jenkins on Google Cloud: integrations/google_cloud/ReadMe.md
- Docker Help: integrations/docker/ReadMe.md
- Recorder and Exporting: seleniumbase/utilities/selenium_ide/ReadMe.md
- Master QA: seleniumbase/masterqa/ReadMe.md
- Help Docs ToC:
- Table of Contents: help_docs/ReadMe.md
- API Reference: help_docs/method_summary.md
- Master QA: seleniumbase/masterqa/ReadMe.md
- Decorators & Security: seleniumbase/common/ReadMe.md
- Using Safari Driver: help_docs/using_safari_driver.md
- macOS Hidden Files: help_docs/hidden_files_info.md
- Happy Customers: help_docs/happy_customers.md
- Thank You: help_docs/thank_you.md