Esempio n. 1
0
 //[Test, Description("Verify When User sends an Invalid Length to Distribution Name Then it throws an Error Message")]
 public void TC_05_ValidateDistributionNamelengthWithLessThan5Characters()
 {
     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.ClickAddProject();
         System.Threading.Thread.Sleep(3000);
         String expected = addProject.EnterProjectTitle();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickContentType();
         System.Threading.Thread.Sleep(15000);
         addProject.ClickSourceControlTypeGitLab();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickRepository();
         System.Threading.Thread.Sleep(5000);
         addProject.EnterPublishedPath("Publishing path to create project");
         System.Threading.Thread.Sleep(5000);
         addProject.EnterDescription("This is to create Project");
         System.Threading.Thread.Sleep(5000);
         addProject.ClickCreateProject();
         System.Threading.Thread.Sleep(25000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(5000);
         String status         = addProject.GetNotificationStatus();
         String projectDetails = addProject.GetCreatedProject();
         String path           = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path, "Project Created Successfully");
         Assert.IsTrue(VerifyText("Success", status, "Project is Created with status:" + status + "", "Project is not created with status: " + status + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(15000);
         CreateDistributionPage distmodule = new CreateDistributionPage(driver);
         System.Threading.Thread.Sleep(3000);
         distmodule.SearchForProject(expected);
         System.Threading.Thread.Sleep(5000);
         distmodule.ClickDistribution();
         String expected1 = "Please enter at least 5 characters.";
         distmodule.EnterInvalidnNameLength();
         System.Threading.Thread.Sleep(7000);
         distmodule.EnterDescription("Description");
         String actual = distmodule.GetText(distmodule.INVALID_TITLE_LENGTH);
         String path1  = TakeScreenshot(driver);
         distmodule.SuccessScreenshot(path1, "Validating Distribution Name Length");
         System.Threading.Thread.Sleep(7000);
         Assert.IsTrue(VerifyEquals(expected1, actual, "Validation of Length Constraints for Distribution Name Field is successful", "Validation of Length Constraints for Distribution Name Field is Not successful"));
         distmodule.ClickCloseButton();
         System.Threading.Thread.Sleep(5000);
     }
     catch (AssertionException)
     {
         fail("Assertion failed");
         throw;
     }
 }
Esempio n. 2
0
 //[Test, Description("Verify New Draft Button is enabled or not")]
 public void TC_01_ValidateNewDraftButtonDialogBoxIsAppearedOrNot()
 {
     try
     {
         String TestName    = (TestContext.CurrentContext.Test.Name.ToString());
         String description = TestContext.CurrentContext.Test.Properties.Get("Description").ToString();
         CreateTest(TestName, description);
         System.Threading.Thread.Sleep(5000);
         AddProjectPage addProject = new AddProjectPage(driver);
         addProject.ClickAddProject();
         System.Threading.Thread.Sleep(3000);
         String expected = addProject.EnterProjectTitle();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickContentType();
         System.Threading.Thread.Sleep(15000);
         addProject.ClickSourceControlTypeGitLab();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickRepository();
         System.Threading.Thread.Sleep(5000);
         addProject.EnterPublishedPath("Publishing path to create project");
         System.Threading.Thread.Sleep(5000);
         addProject.EnterDescription("This is to create Project");
         System.Threading.Thread.Sleep(5000);
         addProject.ClickCreateProject();
         System.Threading.Thread.Sleep(25000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(5000);
         String status         = addProject.GetNotificationStatus();
         String projectDetails = addProject.GetCreatedProject();
         String path           = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path, "Project Created Successfully");
         Assert.IsTrue(VerifyText("Success", status, "Project is Created with status:" + status + "", "Project is not created with status: " + status + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(15000);
         CreateDistributionPage distmodule = new CreateDistributionPage(driver);
         System.Threading.Thread.Sleep(3000);
         distmodule.SearchForProject(expected);
         System.Threading.Thread.Sleep(3000);
         distmodule.ClickDistribution();
         System.Threading.Thread.Sleep(8000);
         String expected1 = distmodule.EnterDistirbutionName();
         System.Threading.Thread.Sleep(75000);
         distmodule.ClickBranchWithTOC();
         System.Threading.Thread.Sleep(5000);
         distmodule.EnterTocPath();
         distmodule.EnterDescription("This is to create a distribution");
         System.Threading.Thread.Sleep(5000);
         distmodule.ClickCreateDistribution();
         System.Threading.Thread.Sleep(40000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(15000);
         String status1 = addProject.GetNotificationStatus();
         String path1   = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path1, "Distribution got Created successfully");
         Assert.IsTrue(VerifyText("Success", status1, "Distribution is Created with status:" + status1 + "", "Distribution is not created with status: " + status1 + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(5000);
         CreateDraftPage createDraft = new CreateDraftPage(driver);
         System.Threading.Thread.Sleep(8000);
         createDraft.CLICKOPENPROJECT();
         System.Threading.Thread.Sleep(8000);
         createDraft.ClikOnBackdrop();
         System.Threading.Thread.Sleep(5000);
         createDraft.ClickNewDraft();
         System.Threading.Thread.Sleep(5000);
         Boolean flag = createDraft.isDraftPopUpEnabled();
         System.Threading.Thread.Sleep(5000);
         String path2 = TakeScreenshot(driver);
         createDraft.SuccessScreenshot(path2, "Draft Dialog Box Is appeared on screen");
         Assert.IsTrue(VerifyBoolean(true, flag, "Draft Dialog Box got Opened Successfully", "Draft Dialog Box is not Opened Successfully"));
         createDraft.CLOSEDRAFT();
     }
     catch (AssertionException)
     {
         fail("Assertion failed");
         throw;
     }
 }
Esempio n. 3
0
 //[Test, Description("Verify User is able to add Distribution for the GitLab Project with all Fields")]
 public void TC_01_ValidateCreateDistributionForGitLabProjectWithAllFields()
 {
     try
     {
         String TestName    = (TestContext.CurrentContext.Test.Name.ToString());
         String description = TestContext.CurrentContext.Test.Properties.Get("Description").ToString();
         CreateTest(TestName, description);
         System.Threading.Thread.Sleep(5000);
         AddProjectPage addProject = new AddProjectPage(driver);
         addProject.ClickAddProject();
         System.Threading.Thread.Sleep(3000);
         String expected = addProject.EnterProjectTitle();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickContentType();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickSourceControlTypeGitLab();
         System.Threading.Thread.Sleep(25000);
         addProject.ClickRepository();
         System.Threading.Thread.Sleep(5000);
         addProject.EnterPublishedPath("Publishing path to create project");
         System.Threading.Thread.Sleep(5000);
         addProject.EnterDescription("This is to create Project");
         System.Threading.Thread.Sleep(5000);
         addProject.ClickCreateProject();
         System.Threading.Thread.Sleep(25000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(5000);
         String status         = addProject.GetNotificationStatus();
         String projectDetails = addProject.GetCreatedProject();
         String path           = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path, "Project Created Successfully");
         Assert.IsTrue(VerifyText("Success", status, "Project is Created with status:" + status + "", "Project is not created with status: " + status + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(15000);
         CreateDistributionPage distmodule = new CreateDistributionPage(driver);
         System.Threading.Thread.Sleep(3000);
         distmodule.SearchForProject(expected);
         System.Threading.Thread.Sleep(3000);
         distmodule.ClickDistribution();
         System.Threading.Thread.Sleep(8000);
         String expected1 = distmodule.EnterDistirbutionName();
         System.Threading.Thread.Sleep(85000);
         distmodule.ClickBranchWithTOC();
         System.Threading.Thread.Sleep(5000);
         distmodule.EnterTocPath();
         distmodule.EnterDescription("This is to create a distribution");
         System.Threading.Thread.Sleep(5000);
         distmodule.ClickCreateDistribution();
         System.Threading.Thread.Sleep(40000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(15000);
         String status1 = addProject.GetNotificationStatus();
         String path1   = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path1, "Distribution got Created successfully With TOC Path");
         Assert.IsTrue(VerifyText("Success", status1, "Distribution is Created For GitLab TOC with status:" + status1 + "", "Distribution is not created For GitLab TOC with status: " + status1 + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(5000);
         distmodule.ClickDistribution();
         System.Threading.Thread.Sleep(18000);
         String actual = distmodule.getDistributionName();
         String path2  = TakeScreenshot(driver);
         distmodule.SuccessScreenshot(path2, "Created Distribution:  " + expected1 + "");
         Assert.IsTrue(VerifyEquals(expected1, actual, "Create Distribution for GitLab Project With TOC is successful", "Create Distribution for GitLab Project With TOC is not successful"));
         System.Threading.Thread.Sleep(8000);
         String expected2 = distmodule.EnterDistirbutionName();
         System.Threading.Thread.Sleep(85000);
         distmodule.ClickBranchWithOutTOC();
         System.Threading.Thread.Sleep(5000);
         distmodule.EnterDescription("This is to create a distribution");
         System.Threading.Thread.Sleep(5000);
         distmodule.ClickCreateDistribution();
         System.Threading.Thread.Sleep(40000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(15000);
         String status2 = addProject.GetNotificationStatus();
         String path3   = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path3, "Distribution: " + expected2 + " got Created successfully Without TOC Path");
         Assert.IsTrue(VerifyText("Success", status2, "Distribution is Created For GitLab Without TOC with status:" + status2 + "", "Distribution is not created For GitLab without TOC with status: " + status2 + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(5000);
     }
     catch (AssertionException)
     {
         fail("Assertion failed");
         throw;
     }
 }
 //[Test, Description("Verify User Is able to View a DropDown on Clicking of AcceptDraftToLive Button When both drafts are different")]
 public void TC_01_ValidateUserAbleToSeeDropDownOnAccepttodraftliveButtonIfBothTheDraftsAreDifferent()
 {
     try
     {
         String TestName    = (TestContext.CurrentContext.Test.Name.ToString());
         String description = TestContext.CurrentContext.Test.Properties.Get("Description").ToString();
         CreateTest(TestName, description);
         System.Threading.Thread.Sleep(5000);
         AddProjectPage addProject = new AddProjectPage(driver);
         addProject.ClickAddProject();
         System.Threading.Thread.Sleep(3000);
         String expected = addProject.EnterProjectTitle();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickContentType();
         System.Threading.Thread.Sleep(15000);
         addProject.ClickSourceControlTypeGitLab();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickRepository();
         System.Threading.Thread.Sleep(5000);
         addProject.EnterPublishedPath("Publishing path to create project");
         System.Threading.Thread.Sleep(5000);
         addProject.EnterDescription("This is to create Project");
         System.Threading.Thread.Sleep(5000);
         addProject.ClickCreateProject();
         System.Threading.Thread.Sleep(25000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(5000);
         String status         = addProject.GetNotificationStatus();
         String projectDetails = addProject.GetCreatedProject();
         String path           = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path, "Project Created Successfully");
         Assert.IsTrue(VerifyText("Success", status, "Project is Created with status:" + status + "", "Project is not created with status: " + status + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(15000);
         CreateDistributionPage distmodule = new CreateDistributionPage(driver);
         System.Threading.Thread.Sleep(3000);
         distmodule.SearchForProject(expected);
         System.Threading.Thread.Sleep(3000);
         distmodule.ClickDistribution();
         System.Threading.Thread.Sleep(8000);
         String expected1 = distmodule.EnterDistirbutionName();
         System.Threading.Thread.Sleep(85000);
         distmodule.ClickBranchWithTOC();
         System.Threading.Thread.Sleep(5000);
         distmodule.EnterTocPath();
         distmodule.EnterDescription("This is to create a distribution");
         System.Threading.Thread.Sleep(5000);
         distmodule.ClickCreateDistribution();
         System.Threading.Thread.Sleep(50000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(25000);
         String status1 = addProject.GetNotificationStatus();
         String path1   = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path1, "Distribution got Created successfully");
         Assert.IsTrue(VerifyText("Success", status1, "Distribution is Created with status:" + status1 + "", "Distribution is not created with status: " + status1 + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(5000);
         CreateDraftPage createDraft = new CreateDraftPage(driver);
         System.Threading.Thread.Sleep(8000);
         createDraft.CLICKOPENPROJECT();
         System.Threading.Thread.Sleep(10000);
         createDraft.ClikOnBackdrop();
         System.Threading.Thread.Sleep(5000);
         createDraft.ClickNewDraft();
         System.Threading.Thread.Sleep(5000);
         String Expected1 = createDraft.EnterValidDraftName();
         createDraft.CreateDraft();
         System.Threading.Thread.Sleep(15000);
         System.Threading.Thread.Sleep(5000);
         addProject.ClickNotifications();
         String path2 = TakeScreenshot(driver);
         createDraft.SuccessScreenshot(path2, "Created a Draft: " + Expected1 + "");
         addProject.BackToProject();
         AuthoringScreenEnhancements auth = new AuthoringScreenEnhancements(driver);
         System.Threading.Thread.Sleep(5000);
         auth.LeftDraftDropDown(Expected1);
         System.Threading.Thread.Sleep(5000);
         auth.ClickAcceptDraftToLive();
         String path3 = TakeScreenshot(driver);
         createDraft.SuccessScreenshot(path3, "DropDown Appears in Accept Draft to live When two different drafts are selected");
         String Actual = auth.GetDropDownValues();
         Console.WriteLine("DropDown Contains:   " + Actual);
         //auth.LeftDraftDropDown();
     }
     catch (AssertionException)
     {
         fail("Assertion failed");
         throw;
     }
 }
 //[Test, Description("Verify User is able to edit the existing draft content in Left side GDOC")]
 public void TC_01_ValidateScreenEnhancementsWhenUserEditsExistingContentInLeftGdoc()
 {
     try
     {
         String TestName    = (TestContext.CurrentContext.Test.Name.ToString());
         String description = TestContext.CurrentContext.Test.Properties.Get("Description").ToString();
         CreateTest(TestName, description);
         System.Threading.Thread.Sleep(5000);
         AddProjectPage addProject = new AddProjectPage(driver);
         addProject.ClickAddProject();
         System.Threading.Thread.Sleep(3000);
         String expected = addProject.EnterProjectTitle();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickContentType();
         System.Threading.Thread.Sleep(15000);
         addProject.ClickSourceControlTypeGitLab();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickRepository();
         System.Threading.Thread.Sleep(5000);
         addProject.EnterPublishedPath("Publishing path to create project");
         System.Threading.Thread.Sleep(5000);
         addProject.EnterDescription("This is to create Project");
         System.Threading.Thread.Sleep(5000);
         addProject.ClickCreateProject();
         System.Threading.Thread.Sleep(25000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(5000);
         String status         = addProject.GetNotificationStatus();
         String projectDetails = addProject.GetCreatedProject();
         String path           = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path, "Project Created Successfully");
         Assert.IsTrue(VerifyText("Success", status, "Project is Created with status:" + status + "", "Project is not created with status: " + status + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(15000);
         CreateDistributionPage distmodule = new CreateDistributionPage(driver);
         System.Threading.Thread.Sleep(3000);
         distmodule.SearchForProject(expected);
         System.Threading.Thread.Sleep(3000);
         distmodule.ClickDistribution();
         System.Threading.Thread.Sleep(8000);
         String expected1 = distmodule.EnterDistirbutionName();
         System.Threading.Thread.Sleep(75000);
         distmodule.ClickBranchWithTOC();
         System.Threading.Thread.Sleep(5000);
         distmodule.EnterTocPath();
         distmodule.EnterDescription("This is to create a distribution");
         System.Threading.Thread.Sleep(5000);
         distmodule.ClickCreateDistribution();
         System.Threading.Thread.Sleep(40000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(15000);
         String status1 = addProject.GetNotificationStatus();
         String path1   = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path1, "Distribution got Created successfully");
         Assert.IsTrue(VerifyText("Success", status1, "Distribution is Created with status:" + status1 + "", "Distribution is not created with status: " + status1 + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(5000);
         CreateDraftPage createDraft = new CreateDraftPage(driver);
         System.Threading.Thread.Sleep(8000);
         createDraft.CLICKOPENPROJECT();
         System.Threading.Thread.Sleep(10000);
         createDraft.ClikOnBackdrop();
         System.Threading.Thread.Sleep(5000);
         createDraft.ClickNewDraft();
         System.Threading.Thread.Sleep(5000);
         String draftName = createDraft.EnterValidDraftName();
         createDraft.SelectCoderDraft();
         System.Threading.Thread.Sleep(5000);
         createDraft.CreateDraft();
         System.Threading.Thread.Sleep(15000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(8000);
         String status2 = addProject.GetNotificationStatus();
         String path2   = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path2, "Draft got Created Successfully");
         Assert.IsTrue(VerifyText("Success", status2, "Draft: " + draftName + " is Created with status:" + status2 + "", "Draft is not created with status: " + status2 + ""));
         addProject.BackToProject();
         AuthoringScreenEnhancements auth = new AuthoringScreenEnhancements(driver);
         System.Threading.Thread.Sleep(8000);
         auth.LeftDraftDropDown(draftName);
         System.Threading.Thread.Sleep(5000);
         IWebElement framel = auth.EnterIntoLeftFrame();
         driver.SwitchTo().Frame(framel);
         System.Threading.Thread.Sleep(5000);
         driver.SwitchTo().ActiveElement();
         auth.ClickGdocLeft();
         driver.SwitchTo().ActiveElement().SendKeys("SELENIUM_TEST_123");
         System.Threading.Thread.Sleep(15000);
         String path3 = TakeScreenshot(driver);
         auth.SuccessScreenshot(path3, "Editing Existing Draft in GDOC Left");
         driver.SwitchTo().DefaultContent();
         auth.RightDraftDropDown(draftName);
         System.Threading.Thread.Sleep(5000);
     }
     catch (AssertionException)
     {
         fail("Assertion failed");
         throw;
     }
 }