(self)
| 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 |
no test coverage detected