MCPcopy Index your code
hub / github.com/seleniumbase/SeleniumBase / __check_scope

Method __check_scope

seleniumbase/fixtures/base_case.py:11944–11961  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

11942 ############
11943
11944 def __check_scope(self):
11945 if hasattr(self, "browser"): # self.browser stores the type of browser
11946 return # All good: setUp() already initialized variables in "self"
11947 else:
11948 message = (
11949 "\n It looks like you are trying to call a SeleniumBase method"
11950 "\n from outside the scope of your test class's `self` object,"
11951 "\n which is initialized by calling BaseCase's setUp() method."
11952 "\n The `self` object is where all test variables are defined."
11953 "\n If you created a custom setUp() method (that overrided the"
11954 "\n the default one), make sure to call super().setUp() in it."
11955 "\n When using page objects, be sure to pass the `self` object"
11956 "\n from your test class into your page object methods so that"
11957 "\n they can call BaseCase class methods with all the required"
11958 "\n variables, which are initialized during the setUp() method"
11959 "\n that runs automatically before all tests called by pytest."
11960 )
11961 raise OutOfScopeException(message)
11962
11963 ############
11964

Callers 15

openMethod · 0.95
getMethod · 0.95
clickMethod · 0.95
slow_clickMethod · 0.95
double_clickMethod · 0.95
context_clickMethod · 0.95
click_chainMethod · 0.95
update_textMethod · 0.95
add_textMethod · 0.95
typeMethod · 0.95
send_keysMethod · 0.95
submitMethod · 0.95

Calls 1

OutOfScopeExceptionClass · 0.90

Tested by

no test coverage detected