Esempio n. 1
0
 private ViewFactory _GetPageFactory()
 {
     if (WebDriverFactory.GetCurrentDriver() != null && _PageFactoriesBag.ContainsKey(WebDriverFactory.GetCurrentDriver()))
     {
         return(_PageFactoriesBag[WebDriverFactory.GetCurrentDriver()]);
     }
     else
     {
         var driver      = WebDriverFactory.GetDriver(Configuration.GetConfiguration().HubUrl);
         var _pageObject = new ViewFactory(driver);
         _PageFactoriesBag.Add(driver, _pageObject);
         return(_pageObject);
     }
 }
Esempio n. 2
0
 public static void RemovePageFactory()
 {
     PageFactoryInstance._RemovePageFactory(WebDriverFactory.GetCurrentDriver());
 }