|
1 | 1 | # -*- coding: utf-8 -*-
|
2 |
| -r""" ------------> ------------> ------------> ------------> |
3 |
| - ______ __ _ ____ |
4 |
| - / ____/__ / /__ ____ (_)_ ______ ___ / _ \____ ________ |
5 |
| - \__ \/ _ \/ / _ \/ __ \/ / / / / __ `__ \/ /_) / __ \/ ___/ _ \ |
6 |
| - ___/ / __/ / __/ / / / / /_/ / / / / / / /_) / (_/ /__ / __/ |
7 |
| -/____/\___/_/\___/_/ /_/_/\__,_/_/ /_/ /_/_____/\__,_/____/\___/ |
8 |
| - |
9 |
| -------------> ------------> ------------> ------------> |
| 2 | +r"""-----------------------------------------------------------------> |
| 3 | +| ______ __ _ ____ | |
| 4 | +| / ____/__ / /__ ____ (_)_ ______ ___ / _ \____ ________ | |
| 5 | +| \__ \/ _ \/ / _ \/ __ \/ / / / / __ `__ \ / /_) / __ \/ ___/ _ \ | |
| 6 | +| ___/ / __/ / __/ / / / / /_/ / / / / / // /_) / (_/ /__ / __/ | |
| 7 | +| /____/\___/_/\___/_/ /_/_/\__,_/_/ /_/ /_//_____/\__,_/____/\___/ | |
| 8 | +| | |
| 9 | +---------------------------------------------------------------------> |
10 | 10 |
|
11 | 11 | The BaseCase class is the main gateway for using The SeleniumBase Framework.
|
12 |
| -It inherits Python's unittest.TestCase class, and runs with Pytest or Nose. |
| 12 | +It inherits Python's unittest.TestCase class and runs with pytest or nosetests. |
13 | 13 | All tests using BaseCase automatically launch WebDriver browsers for tests.
|
14 | 14 |
|
15 |
| -Usage: |
| 15 | +Example Test: |
16 | 16 |
|
17 |
| - from seleniumbase import BaseCase |
18 |
| - class MyTestClass(BaseCase): |
19 |
| - def test_anything(self): |
20 |
| - # Write your code here. Example: |
21 |
| - self.open("https://github.com/") |
22 |
| - self.type("input.header-search-input", "SeleniumBase\n") |
23 |
| - self.click('a[href="/seleniumbase/SeleniumBase"]') |
24 |
| - self.assert_element("div.repository-content") |
25 |
| - .... |
| 17 | +# -------------------------------------------------------------- |
| 18 | +from seleniumbase import BaseCase |
| 19 | +class MyTestClass(BaseCase): |
| 20 | + def test_anything(self): |
| 21 | + # Write your code here. Example: |
| 22 | + self.open("https://github.com/") |
| 23 | + self.type("input.header-search-input", "SeleniumBase\n") |
| 24 | + self.click('a[href="/seleniumbase/SeleniumBase"]') |
| 25 | + self.assert_element("div.repository-content") |
| 26 | +# -------------------------------------------------------------- |
26 | 27 |
|
27 | 28 | SeleniumBase methods expand and improve on existing WebDriver commands.
|
28 | 29 | Improvements include making WebDriver more robust, reliable, and flexible.
|
@@ -13573,3 +13574,13 @@ def tearDown(self):
|
13573 | 13574 | if deferred_exception:
|
13574 | 13575 | # User forgot to call "self.process_deferred_asserts()" in test
|
13575 | 13576 | raise deferred_exception
|
| 13577 | + |
| 13578 | + |
| 13579 | +r"""-----------------------------------------------------------------> |
| 13580 | +| ______ __ _ ____ | |
| 13581 | +| / ____/__ / /__ ____ (_)_ ______ ___ / _ \____ ________ | |
| 13582 | +| \__ \/ _ \/ / _ \/ __ \/ / / / / __ `__ \ / /_) / __ \/ ___/ _ \ | |
| 13583 | +| ___/ / __/ / __/ / / / / /_/ / / / / / // /_) / (_/ /__ / __/ | |
| 13584 | +| /____/\___/_/\___/_/ /_/_/\__,_/_/ /_/ /_//_____/\__,_/____/\___/ | |
| 13585 | +| | |
| 13586 | +------------------------------------------------------------------>""" |
0 commit comments