public void Test_DeleteFolderUsingToolBar(string folderName, string nameToDelete) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Delete Folder:'"); var adminFileManagementPage = new AdminFileManagementPage(_driver); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); adminFileManagementPage.SetItemsPerPage("All"); adminFileManagementPage.DeleteUsingToolBar(folderName, nameToDelete); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the Folder is NOT present in the list"); Assert.IsFalse(adminFileManagementPage.ElementPresent(By.XPath(FileManagementPage.FileView + "//trtr[contains(@style, 'visibility: visible;')]/td/div[@title = '" + nameToDelete + "']")), "The Folder is not deleted correctly"); }
public void Test010_DeleteFileUsingToolBar( [ValuesAttribute("StandardFolder")] string folderName, [ValuesAttribute("Birds_files.bmp", "Birds_files.docx", "Birds_files.gif", "Birds_files.jpg", "Birds_files.mp3", "Birds_files.pdf", "Birds_files.png", "Birds_files.pptx", "Birds_files.rar", "Birds_files.swf", "Birds_files.txt", "Birds_files.xlsx", "Birds_files.xml")] string nameToDelete) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Delete File:'"); var adminFileManagementPage = new AdminFileManagementPage(_driver); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); adminFileManagementPage.SetItemsPerPage("All"); adminFileManagementPage.DeleteUsingToolBar(folderName, nameToDelete); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the File is NOT present in the list"); Assert.IsFalse(adminFileManagementPage.ElementPresent(By.XPath(FileManagementPage.FileView + "//tr/td/div[@title = '" + nameToDelete + "']")), "The File is not deleted correctly"); }