Esempio n. 1
0
 //   [Test, Description("Verify User is able to Upload CodeBlocks in Media Screen")]
 public void TC_01_ValidationOfUploadCodeBlock()
 {
     try
     {
         String TestName    = (TestContext.CurrentContext.Test.Name.ToString());
         String description = TestContext.CurrentContext.Test.Properties.Get("Description").ToString();
         CreateTest(TestName, description);
         Console.WriteLine("Entered into testcase");
         AuthoringScreenEnhancements auth = new AuthoringScreenEnhancements(driver);
         System.Threading.Thread.Sleep(5000);
         auth.ClickMedia();
         auth.ClickCodeBlocksTab();
         System.Threading.Thread.Sleep(5000);
         auth.UploadCodeBlock();
         System.Threading.Thread.Sleep(2000);
         String path1 = TakeScreenshot(driver);
         auth.SuccessScreenshot(path1, "Uploaded New CodeBlock");
         AddProjectPage addProject = new AddProjectPage(driver);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(5000);
         String str = addProject.GetNotificationName();
         result = str.Split(new[] { ':' }).Skip(1).FirstOrDefault();
         Console.WriteLine("&&&&&" + result);
         String path2 = TakeScreenshot(driver);
         auth.SuccessScreenshot(path2, "Uploaded New CodeBlock" + result + " with Notification");
         addProject.BackToProject();
         System.Threading.Thread.Sleep(2000);
         auth.ClickDashboard();
     }
     catch (AssertionException)
     {
         fail("Assertion failed");
         throw;
     }
 }