Add a new method / Refresh dependencies / Do some refactoring
- Add new method: quit_extra_driver()
- Improve exception-handling for ElementClickInterceptedException
- Handle a special edge case where the user overrides get_new_driver()
- Refresh Python dependencies
--pytest==7.1.1;python_version>="3.7"
--setuptools>=60.10.0;python_version>="3.7"
--urllib3==1.26.9
def quit_extra_driver(self, driver=None):
""" Quits the driver only if it's not the default/initial driver.
If a driver is given, quits that, otherwise quits the active driver.
Raises an Exception if quitting the default/initial driver.
Should only be called if a test has already called get_new_driver().
Afterwards, self.driver points to the default/initial driver
if self.driver was the one being quit.
----
If a test never calls get_new_driver(), this method isn't needed.
SeleniumBase automatically quits browsers after tests have ended.
Even if tests do call get_new_driver(), you don't need to use this
method unless you want to quit extra browsers before a test ends.
----
Terminology and important details:
* Active driver: The one self.driver is set to. Used within methods.
* Default/initial driver: The one that is spun up when tests start.
Initially, the active driver and the default driver are the same.
The active driver can change when one of these methods is called:
> self.get_new_driver()
> self.switch_to_default_driver()
> self.switch_to_driver()
> self.quit_extra_driver()
"""