Esempio n. 1
0
        //public void CloseWalkMeDialogIfPresent()
        //{
        //    //Force Sleep statement due to Load Time of WalkMe Links
        //    Thread.Sleep(5000);
        //    List<IWebElement> closeWalkMeLinks = new List<IWebElement>();
        //    closeWalkMeLinks.AddRange(driver.FindElements(By.CssSelector(".walkme-action-close")));

        //    if (closeWalkMeLinks.Count > 0) { closeWalkMeLinks[0].Click(); }
        //}

        //testing local run
        public void EvaluateScreenshotSourcePageSaving()
        {
            if (TestContext.CurrentContext.Result.Outcome.Status != ResultState.Success.Status)
            {
                string testName = TestContext.CurrentContext.Test.MethodName + "_";
                if (Convert.ToBoolean(ConfigurationManager.AppSettings.Get("ScreenOnFail?")))
                {
                    PageScreenshot.Take(driver, testName);
                }
                if (Convert.ToBoolean(ConfigurationManager.AppSettings.Get("SourceOnFail?")))
                {
                    PageSource.Save(driver, testName);
                }
            }
        }