Exemple #1
0
 // [Test, Description("Verifying User is able to send more than 1000 characters to Description field in Create Project")]
 public void TC_08_ValidateProjectDescriptionLengthWithMoreThan1000Characters()
 {
     try
     {
         String TestName    = (TestContext.CurrentContext.Test.Name.ToString());
         String description = TestContext.CurrentContext.Test.Properties.Get("Description").ToString();
         CreateTest(TestName, description);
         AddProjectPage addProject = new AddProjectPage(driver);
         addProject.ClickDashboard();
         System.Threading.Thread.Sleep(3000);
         addProject.ClickAddProject();
         String expected = addProject.EnterProjectTitle();
         addProject.ClickContentType();
         System.Threading.Thread.Sleep(15000);
         addProject.ClickRepository();
         addProject.EnterPublishedPath("Publishing path to create project");
         String str = addProject.ProjectDescriptionMorethan1000();
         Console.WriteLine("The Text Beyonnd 1000 is " + str);
         String path = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path, "Length of the Description exceeded its limit");
         String str1 = addProject.GetDescriptionLength();
         Assert.IsTrue(VerifyEquals("1000/1000", str1, "Length Of Project Title got exceeded to its limit as " + str1 + "", "Length Of Project Title Not got exceeded to its limit as " + str1 + ""));
         addProject.ClickCreateProject();
         System.Threading.Thread.Sleep(7000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(5000);
         addProject.BackToProject();
         CreateDistributionPage distmodule = new CreateDistributionPage(driver);
         System.Threading.Thread.Sleep(7000);
         distmodule.SearchForProject(expected);
         System.Threading.Thread.Sleep(7000);
         String path1 = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path1, "Description Length");
         String txt = addProject.GetDescriptionText();
         Assert.IsTrue(VerifyContainsText(txt, str, "Description Text is validated successfully", "Description Text is not validated successfully"));
         System.Threading.Thread.Sleep(5000);
     }
     catch (AssertionException)
     {
         fail("Assertion failed");
         throw;
     }
 }