Skip to content

Commit cdd0d56

Browse files
committed
Update the documentation
1 parent 2c080f8 commit cdd0d56

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

help_docs/syntax_formats.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@
4242
<a id="sb_sf_01"></a>
4343
<h3><img src="https://seleniumbase.github.io/img/logo3b.png" title="SeleniumBase" width="32" /> 1. BaseCase direct class inheritance</h3>
4444

45-
This format is used by most of the examples in the <a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples">SeleniumBase examples folder</a>. It's a great starting point for anyone learning SeleniumBase, and it follows good object-oriented programming principles.
45+
In this format, (which is used by most of the tests in the <a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples">SeleniumBase examples folder</a>), <code>BaseCase</code> is imported at the top of a Python file, followed by a Python class inheriting <code>BaseCase</code>. Then, any test method defined in that class automatically gains access to SeleniumBase methods, including the <code>setUp()</code> and <code>tearDown()</code> methods that are automatically called for opening and closing web browsers at the start and end of tests.
4646

47-
In this format, <code>BaseCase</code> is imported at the top of a Python file, followed by a Python class inheriting <code>BaseCase</code>. Then, any test method defined in that class automatically gains access to SeleniumBase methods, including the <code>setUp()</code> and <code>tearDown()</code> methods that are automatically called to spin up and spin down web browsers at the beginning and end of test methods.
48-
49-
To run a test of this format, use **``pytest``** or ``nosetests``. If you add: ``if __name__ == "__main__":`` ``pytest.main([__file__])`` to the file, you can also use ``python`` as a runner, which invokes ``pytest``. Here's an example a script that uses ``BaseCase`` inheritance:
47+
To run a test of this format, use **``pytest``** or ``nosetests``. If you add: ``if __name__ == "__main__":`` ``pytest.main([__file__])`` to a file, you can also use ``python`` as a runner, which invokes ``pytest``. Here's an example:
5048

5149
```python
5250
from seleniumbase import BaseCase
@@ -69,6 +67,8 @@ if __name__ == "__main__": # Use "python" to call "pytest"
6967

7068
(See <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py">examples/test_demo_site.py</a> for the full test.)
7169

70+
Using ``BaseCase`` inheritance is a great starting point for anyone learning SeleniumBase, and it follows good object-oriented programming principles.
71+
7272
<a id="sb_sf_02"></a>
7373
<h3><img src="https://seleniumbase.github.io/img/logo3b.png" title="SeleniumBase" width="32" /> 2. BaseCase subclass inheritance</h3>
7474

0 commit comments

Comments
 (0)