Beispiel #1
0
 public void Setup()
 {
     testData = TestDataUtil.GetTestData(GetType().Name.Trim());
     BrowserExt.Initiate(Config.Get(ConfigString.BaseUrl),
                         Config.Get(ConfigInt.ResolutionWidth),
                         Config.Get(ConfigInt.ResolutionHeight));
 }
Beispiel #2
0
 public void Teardown()
 {
     if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed)
     {
         var directory = $"{Directory.GetCurrentDirectory()}\\Screenshots";
         Directory.CreateDirectory(directory);
         File.WriteAllBytes($"{directory}\\{GetType().Name}_{DateTime.Now.Ticks}.jpeg",
                            BrowserExt.GetScreenshot());
     }
     BrowserExt.Quit();
 }