Skip to content

Commit 7ad6e57

Browse files
committed
Update an error message
1 parent 75e45d7 commit 7ad6e57

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6789,13 +6789,16 @@ def __check_scope(self):
67896789
from seleniumbase.common.exceptions import OutOfScopeException
67906790
message = (
67916791
"\n It looks like you are trying to call a SeleniumBase method"
6792-
"\n from outside the scope of your test class's `self` object."
6792+
"\n from outside the scope of your test class's `self` object,"
6793+
"\n which is initialized by calling BaseCase's setUp() method."
6794+
"\n The `self` object is where all test variables are defined."
6795+
"\n If you created a custom setUp() method (that overrided the"
6796+
"\n the default one), make sure to call super().setUp() in it."
67936797
"\n When using page objects, be sure to pass the `self` object"
67946798
"\n from your test class into your page object methods so that"
67956799
"\n they can call BaseCase class methods with all the required"
67966800
"\n variables, which are initialized during the setUp() method"
67976801
"\n that runs automatically before all tests called by pytest."
6798-
"\n The `self` object is where all test variables are defined."
67996802
)
68006803
raise OutOfScopeException(message)
68016804

0 commit comments

Comments
 (0)