public void SetUp() { try { driver = Browsers.Init(); LogWriter.Logger("Browser has been initialized"); loginObj = new LoginPage(driver); wait = new WebDriverWait(driver, TimeSpan.FromSeconds(100)); objCommonFn = new CommonFunionality(); excel = new ExcelUtility(fullFilePath); string parent = System.IO.Path.GetDirectoryName(System.IO.Path.GetDirectoryName(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location))); var configJson = Path.Combine(parent, "allureConfig.Template.json"); if (File.Exists(configJson)) { Environment.SetEnvironmentVariable("ALLURE_CONFIG", configJson); Environment.CurrentDirectory = Path.GetDirectoryName(GetType().Assembly.Location); AllureLifecycle.Instance.CleanupResultDirectory(); } LogWriter.Logger(" Setup has been done successfully."); } catch (Exception e) { LogWriter.Logger(e.Message); Assert.Fail(); } }
public void SetUp() { try { pageObjCustom = new CustomMsgPage(driver); pageObjLogin = new LoginPage(driver); wait = new WebDriverWait(driver, TimeSpan.FromSeconds(100)); excel = new ExcelUtility(fullFilePath); objCommonFn = new CommonFunionality(); } catch (Exception e) { LogWriter.Logger(e.Message); Assert.Fail(); } }