Skip to content

Commit f7abd5a

Browse files
committed
Add boilerplates to examples
1 parent fc46f88 commit f7abd5a

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

examples/boilerplates/__init__.py

Whitespace-only changes.

examples/boilerplates/master_class.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'''
2+
You can use this as a boilerplate for your test framework.
3+
Define your customized library methods here.
4+
Then have all your test classes inherit it.
5+
The master class will inherit SeleniumBase methods from BaseCase.
6+
'''
7+
8+
from seleniumbase import BaseCase
9+
10+
11+
class MasterTestCase(BaseCase):
12+
13+
def setUp(self):
14+
super(MasterTestCase, self).setUp()
15+
16+
def example_method(self):
17+
pass
18+
19+
20+
'''
21+
# Now you can do something like this in your test files:
22+
23+
from master_class import MasterTestCase
24+
25+
class MyTests(MasterTestCase):
26+
27+
def test_example(self):
28+
self.example_method()
29+
'''

0 commit comments

Comments
 (0)