public static PageObject Instance(Type type)
 {
     if (!_instanceList.ContainsKey(type))
     {
         var driver = DriverFactory.Driver();
         var page   = (PageObject)Activator.CreateInstance(type, driver);
         PageFactory.InitElements(driver, page);
         _instanceList.Add(type, page);
     }
     return(_instanceList[type]);
 }
 public static void Close()
 {
     _instanceList = new Dictionary <Type, PageObject>();
     DriverFactory.CloseCurrent();
 }