@Test(groups = "EnterpriseOnly") public void Enterprise40x_5675() { /** Start Test */ testName = getTestName(); /** Test Data Setup */ String siteName = getSiteName(testName); String testUser = getUserNameFreeDomain(testName); String fileName = getFileName(testName) + ".txt"; String text = getRandomString(5); DocumentLibraryPage documentLibraryPage; // Login ShareUser.login(drone, testUser, DEFAULT_PASSWORD); documentLibraryPage = ShareUser.openSitesDocumentLibrary(drone, siteName); // Click Comment link near created file DocumentDetailsPage detailsPage = documentLibraryPage.getFileDirectoryInfo(fileName).clickCommentsLink().render(); // Write some text in text box and click Add Comment button detailsPage.addComment(text); // Go to document library and verify comment counter documentLibraryPage = ShareUser.openDocumentLibrary(drone); Assert.assertEquals(documentLibraryPage.getFileDirectoryInfo(fileName).getCommentsCount(), 1); // Go to Details page and delete the comment detailsPage = documentLibraryPage.selectFile(fileName); detailsPage.removeComment(text); // Go to document library and verify comment counter documentLibraryPage = ShareUser.openDocumentLibrary(drone); Assert.assertEquals(documentLibraryPage.getFileDirectoryInfo(fileName).getCommentsCount(), 0); }