示例#1
0
 public void CleanUp()
 {
     if (TestContext.CurrentContext.Result.Outcome.Status != TestStatus.Passed)
     {
         Logger.Info($"{AppDomain.CurrentDomain.BaseDirectory}{TestContext.CurrentContext.Test.Name}.jpg");
         Browser.WebDriver.TakeScreenshot().SaveAsFile($@"{AppDomain.CurrentDomain.BaseDirectory}{TestContext.CurrentContext.Test.Name}.jpg");
     }
     Browser.Close();
 }
示例#2
0
 public void SetUp()
 {
     settings = new TestSettings();
     BrowserInit(settings.BrowserName);
     user = XmlReader.Read <User>("UserData.xml");
     Logger.Info($"{TestContext.CurrentContext.Test.Name}" +
                 $"\r\nBrowser:{settings.BrowserName}" +
                 $"\r\nLanguage:{settings.Language}");
 }