public void BeforeClassInitialization() { if (ConfigurationManager.AppSettings["Browser"] == "Chrome") { driver = new ChromeDriver(); } else if (ConfigurationManager.AppSettings["Browser"] == "Firefox") { driver = new FirefoxDriver(); } LoginPage_ = new LoginPage(driver); SearchPage_ = new SearchPage(driver); BasePageClass_ = new BasePageClass(driver); HomePage_ = new HomePage(driver); ScreenshotUtil_ = new ScreenshotUtil(driver); ScreenshotUtil_.SaveScreenShot($"Failed Test{this.GetType().Name}"); BasePageClass_.OpenURL(); _logger.Info($" :Successfully executed the BeforeClassInitialization() method for {this.GetType().Name}"); }
public void BeforeClassInitialization() { if (ConfigurationManager.AppSettings["Browser"] == "Chrome") { driver = new ChromeDriver(); } else if (ConfigurationManager.AppSettings["Browser"] == "Firefox") { driver = new FirefoxDriver(); } _ScreenshotUtil = new ScreenshotUtil(driver); _LoginPage = new LoginPage(driver); _BasePageClass = new BasePageClass(driver); _HomePage = new HomePage(driver); _EnterNewCustomerPage = new EnterNewCustomerPage(driver); _QuotePage = new QuotePage(driver); _BasePageClass.OpenURL(); _logger.Info($" :Successfully executed the BeforeClassInitialization() method for {this.GetType().Name}"); }