コード例 #1
0
ファイル: Hooks.cs プロジェクト: seshaniAscentic/Moyafinal
 public static void BeforeAuthenticationScenario()
 {
     DriverConnections.StartBrowser(Data.BrowserType);
     DriverConnections.GotoURL(Data.BaseURL);
     new LoginPage()
     .Login_to_the_system(Data.Username, Data.Password);
 }
コード例 #2
0
        public void GivenThatIHaveLaunchTheBrowser(string browserType)
        {
            var status = DriverConnections.GetBrowserStatus();

            if (!status.Equals(Data.BaseURL))
            {
                DriverConnections.StartBrowser(Data.BrowserType);
            }
        }
コード例 #3
0
        public void GivenNavigatesToTheLoginPage(string title)
        {
            var status = DriverConnections.GetBrowserStatus();

            if (!status.Equals(Data.BaseURL))
            {
                DriverConnections.GotoURL(Data.BaseURL);
                new LoginPage()
                .Verify_the_Page_Title(title);
            }
        }
コード例 #4
0
ファイル: Hooks.cs プロジェクト: seshaniAscentic/Moyafinal
 public static void AfterAuthenticationFeatuer()
 {
     if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed)
     {
         var screenshot = ((ITakesScreenshot)DriverConnections.Browser).GetScreenshot();
         var filename   = TestContext.CurrentContext.Test.Name + "_screenshot_" + DateTime.Now.Ticks + ".Png";
         var path       = Path.Combine(TestContext.CurrentContext.WorkDirectory, filename);
         screenshot.SaveAsFile(path, ScreenshotImageFormat.Png);
         TestContext.AddTestAttachment(path);
     }
     DriverConnections.StopBrowser();
 }
コード例 #5
0
 public void BrowserTearDown()
 {
     DriverConnections.StopBrowser();
 }
コード例 #6
0
 public void BrowserLaunch()
 {
     DriverConnections.StartBrowser(Data.BrowserType);
     DriverConnections.GotoURL(Data.BaseURL);
 }
コード例 #7
0
ファイル: Hooks.cs プロジェクト: seshaniAscentic/Moyafinal
 public static void AfterAuthenticationScenario()
 {
     DriverConnections.StopBrowser();
 }