text: from selenium import webdriver
  from fixture.session import SessionHelper
  from fixture.group import GroupHelper
  from fixture.contact import ContactHelper
  
  
  class Application:
      def __init__(self, browser, baseUrl):
          if browser == "firefox":
              self.wd = webdriver.Firefox()
          elif browser == "chrome":
              self.wd = webdriver.Chrome()
          else:
              raise ValueError("Unrecognised browser %s" % browser)
  
          self.base_url = baseUrl
          self.wd.implicitly_wait(5)
          self.session = SessionHelper(self)
          self.group = GroupHelper(self)
          self.contact = ContactHelper(self)
  
      def is_valid(self):
          try:
              self.wd.current_url
              return True
          except:
              return False
  
      def open_home_page(self):
          wd = self.wd
          wd.get(self.base_url)
  
      def destroy(self):
          self.wd.quit()
  