Skip to content

Commit 5577d63

Browse files
committed
Update the ReadMe
1 parent 488e956 commit 5577d63

File tree

1 file changed

+38
-27
lines changed

1 file changed

+38
-27
lines changed

README.md

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
<meta property="og:site_name" content="SeleniumBase | Docs">
22
<meta property="og:title" content="SeleniumBase | Python Web Testing" />
33
<meta property="og:description" content="Build fast, reliable, end-to-end tests." />
4+
<meta property="og:keywords" content="Python, pytest, selenium, webdriver, test automation, framework">
45
<meta property="og:image" content="https://seleniumbase.io/cdn/img/sb_logo_dh.png" />
56
<link rel="icon" href="https://seleniumbase.io/img/logo3a.png" />
67

78
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/">
8-
<img src="https://seleniumbase.io/img/sb_logo_10.png" alt="SeleniumBase" width="284" /></a><a href="https://github.com/seleniumbase/SeleniumBase/">
9-
<img src="https://seleniumbase.io/cdn/img/sb_demo_site.png" alt="SeleniumBase" width="284" />
9+
<img src="https://seleniumbase.io/img/sb_logo_10.png" alt="SeleniumBase" width="272" /></a><a href="https://github.com/seleniumbase/SeleniumBase/">
10+
<img src="https://seleniumbase.io/cdn/img/sb_demo_site.png" alt="SeleniumBase" width="244" />
1011
</a></p>
1112
<p align="center"><b>A complete end-to-end testing experience.</b></p>
1213
<p align="center">Extends <a href="https://www.w3.org/TR/webdriver/">Selenium/WebDriver</a> and <a href="https://docs.pytest.org/en/latest/index.html">pytest</a>.</p>
1314
<!-- View on GitHub -->
1415
<p align="center">
1516
<a href="https://github.com/seleniumbase/SeleniumBase/releases">
1617
<img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=2277EE" alt="Latest Release on GitHub" /></a> <a href="https://pypi.python.org/pypi/seleniumbase">
17-
<img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=22AAEE" alt="Latest Release on PyPI" /></a> <a href="https://seleniumbase.io">
18-
<img src="https://img.shields.io/badge/docs-%20seleniumbase.io-11BBDD.svg" alt="SeleniumBase.io Docs" /></a> <a href="https://travis-ci.org/seleniumbase/SeleniumBase">
18+
<img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=22AAEE" alt="Latest Release on PyPI" /></a> <a href="https://gitter.im/seleniumbase/SeleniumBase">
19+
<img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt="SeleniumBase" /></a> <a href="https://travis-ci.org/seleniumbase/SeleniumBase">
1920
<img src="https://img.shields.io/travis/seleniumbase/SeleniumBase/master.svg" alt="SeleniumBase on TravisCI" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions">
20-
<img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://gitter.im/seleniumbase/SeleniumBase">
21-
<img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt="SeleniumBase" /></a>
21+
<img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://seleniumbase.io">
22+
<img src="https://img.shields.io/badge/docs-%20seleniumbase.io-FACE48.svg" alt="SeleniumBase.io Docs" /></a>
2223
</p>
2324

2425
<p>
@@ -55,27 +56,25 @@ Tests are run with <b>pytest</b>. Browsers are controlled by <b>WebDriver</b>.
5556
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">🛂 MasterQA</a>
5657
</p>
5758

58-
<p align="center"><img src="https://cdn2.hubspot.net/hubfs/100006/images/swag_labs_gif.gif" alt="SeleniumBase" title="SeleniumBase" /></p>
59+
<p align="center"><img src="https://cdn2.hubspot.net/hubfs/100006/images/swag_mobile.gif" alt="SeleniumBase Testing" title="SeleniumBase Testing" /></p>
5960

6061
<a id="python_installation"></a>
6162
<h2><img src="https://seleniumbase.io/img/logo3a.png" title="SeleniumBase" width="28" /> Start: 🚀</h2>
6263

6364
* Add **[Python](https://www.python.org/downloads/)** and **[Git](https://git-scm.com/)** to your System PATH.
6465

65-
* Upgrade <b>[pip](https://pypi.org/project/pip/)</b> and create a [Python virtual env](https://seleniumbase.io/help_docs/virtualenv_instructions/):
66+
* Create a [Python virtual environment](https://seleniumbase.io/help_docs/virtualenv_instructions/):
6667

6768
> macOS/Linux (terminal):
6869
6970
```bash
70-
python3 -m pip install -U pip
7171
python3 -m venv sbase_env
7272
source sbase_env/bin/activate
7373
```
7474

7575
> Windows (CMD prompt):
7676
7777
```bash
78-
py -m pip install -U pip
7978
py -m venv sbase_env
8079
call sbase_env\\Scripts\\activate
8180
```
@@ -109,7 +108,7 @@ pip install -e . # Editable install
109108
\__ \/ _ \/ / _ \/ __ \/ / / / / __ `__ \/ /_) / __ \/ ___/ _ \
110109
___/ / __/ / __/ / / / / /_/ / / / / / / /_) / (_/ /__ / __/
111110
/____/\___/_/\___/_/ /_/_/\__,_/_/ /_/ /_/_____/\__,_/____/\___/
112-
111+
-----------------------------------------------------------------
113112
[seleniumbase <VERSION> (<PATH>)]
114113
115114
* USAGE: "seleniumbase [COMMAND] [PARAMETERS]"
@@ -160,24 +159,36 @@ sbase install chromedriver latest
160159
161160
<h3><img src="https://seleniumbase.io/img/logo3a.png" title="SeleniumBase" width="28" /> Create and run tests:</h3>
162161
163-
* Use ``sbase mkdir DIR`` to create a folder with sample tests:
162+
* ``sbase mkdir DIR`` creates a folder with sample tests:
164163
165164
```bash
166165
sbase mkdir ui_tests
167166
cd ui_tests/
168167
```
169168
170-
> This folder contains the following files:
169+
> That folder will have the following files:
171170
172171
```
173-
__init__.py
174-
boilerplates/
175-
my_first_test.py
176-
parameterized_test.py
177-
pytest.ini
178-
requirements.txt
179-
setup.cfg
180-
test_demo_site.py
172+
ui_tests/
173+
174+
├── __init__.py
175+
├── my_first_test.py
176+
├── parameterized_test.py
177+
├── pytest.ini
178+
├── requirements.txt
179+
├── setup.cfg
180+
├── test_demo_site.py
181+
└── boilerplates/
182+
183+
├── __init__.py
184+
├── base_test_case.py
185+
├── boilerplate_test.py
186+
├── page_objects.py
187+
└── samples/
188+
189+
├── __init__.py
190+
├── google_objects.py
191+
└── google_test.py
181192
```
182193
183194
* <b>Run a sample test with ``pytest``:</b>
@@ -186,8 +197,8 @@ test_demo_site.py
186197
pytest test_demo_site.py
187198
```
188199
189-
* Chrome is the default browser if not specified with ``--browser=BROWSER``.
190-
* On Linux ``--headless`` is the default behavior (running with no GUI). You can also run in headless mode on any OS. If your Linux machine has a GUI and you want to see the web browser as tests run, add ``--headed`` or ``--gui``.
200+
> (Chrome is the default browser if not specified with ``--browser=BROWSER``.)
201+
> (On Linux, ``--headless`` is the default behavior. You can also run in headless mode on any OS. If your Linux machine has a GUI and you want to see the web browser as tests run, add ``--headed`` or ``--gui``.)
191202
192203
<b>If you've cloned SeleniumBase from GitHub, you can also run tests from the [SeleniumBase/examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder:</b>
193204
@@ -242,7 +253,7 @@ self.assert_text(TEXT) # Assert text is visible (has optional SELECTOR arg)
242253
self.assert_title(PAGE_TITLE) # Assert page title
243254
self.assert_no_404_errors() # Assert no 404 errors from files on the page
244255
self.assert_no_js_errors() # Assert no JavaScript errors on the page (Chrome-ONLY)
245-
self.execute_script(JAVASCRIPT) # Execute javascript code
256+
self.execute_script(JAVASCRIPT) # Execute JavaScript code
246257
self.go_back() # Navigate to the previous URL
247258
self.get_text(SELECTOR) # Get text from a selector
248259
self.get_attribute(SELECTOR, ATTRIBUTE) # Get a specific attribute from a selector
@@ -296,8 +307,8 @@ nosetests test_suite.py --browser=firefox
296307
All Python methods that start with ``test_`` will automatically be run when using ``pytest`` or ``nosetests`` on a Python file, (<i>or on folders containing Python files</i>). You can also be more specific on what to run within a file by using the following: (<i>Note that the syntax is different for pytest vs nosetests.</i>)
297308
298309
```bash
299-
pytest [FILE_NAME].py::[CLASS_NAME]::[METHOD_NAME]
300-
nosetests [FILE_NAME].py:[CLASS_NAME].[METHOD_NAME]
310+
pytest [FILE_NAME.py]::[CLASS_NAME]::[METHOD_NAME]
311+
nosetests [FILE_NAME.py]:[CLASS_NAME].[METHOD_NAME]
301312
```
302313
303314
<h4>No more flaky tests:</h4>
@@ -441,7 +452,7 @@ Inside your tests, you can use ``self.data`` to access that.
441452
442453
<h3><img src="https://seleniumbase.io/img/logo3a.png" title="SeleniumBase" width="28" /> Test Directory Customization:</h3>
443454
444-
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``)
455+
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]``)
445456
446457
As a shortcut, you'll be able to run ``sbase mkdir [DIRECTORY]`` to create a new folder that already contains necessary files and some example tests that you can run.
447458

0 commit comments

Comments
 (0)