from selenium import webdriver
from _elementtree import Element
from selenium.common.exceptions import NoSuchElementException
class DriverManagment(object):
driver = None
@staticmethod
def getDriver(self):
if DriverManagment.driver = None:
if get_conf_browser() == "Chrome":
DriverManagment.driver = webdriver.Firefox()
else if:
...
return DriverManagment.driver
def closeDriver(self):
driver.close()
DriverManagment.driver = None;
driver = DriverManagment.getDriver()