Exemplo n.º 1
0
 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]);
 }
Exemplo n.º 2
0
 public static void Close()
 {
     _instanceList = new Dictionary <Type, PageObject>();
     DriverFactory.CloseCurrent();
 }