public void Test001_EditAdminExtension() { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Edit the Admin Extension'"); AdminExtensionsPage adminExtensionsPage = new AdminExtensionsPage(_driver); adminExtensionsPage.OpenUsingButtons(_baseUrl); adminExtensionsPage.AccordionOpen(By.XPath(AdminExtensionsPage.ModulesAccordion)); adminExtensionsPage.EditExtensionPermissions(_adminExtensionToEdit); adminExtensionsPage.OpenUsingButtons(_baseUrl); adminExtensionsPage.AccordionOpen(By.XPath(AdminExtensionsPage.ModulesAccordion)); adminExtensionsPage.EditExtension(_adminExtensionToEdit); adminExtensionsPage.AccordionOpen(By.XPath(AdminExtensionsPage.ModuleSettingsAccordion)); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Permission is granted"); Assert.That(adminExtensionsPage.WaitForElement(By.XPath(AdminExtensionsPage.PermissionTable + "'All Users'" + "]]/td/img")).GetAttribute("src"), Is.StringContaining("Grant"), "The Permission is not granted"); }
public void Test006_InstallAdminExtension() { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Install an Admin Extension'"); AdminExtensionsPage adminExtensionsPage = new AdminExtensionsPage(_driver); adminExtensionsPage.OpenUsingButtons(_baseUrl); int itemNumber = adminExtensionsPage.FindElements(By.XPath(HostExtensionsPage.ModulesExtensionsList)).Count; adminExtensionsPage.InstallExtension(_adminFileToUpload); adminExtensionsPage.OpenUsingButtons(_baseUrl); adminExtensionsPage.AccordionOpen(By.XPath(AdminExtensionsPage.ModulesAccordion)); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1"); Assert.That(adminExtensionsPage.FindElements(By.XPath(HostExtensionsPage.ModulesExtensionsList)).Count, Is.EqualTo(itemNumber + 1), "The Extension is not added correctly"); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Extension name is present in the list"); Assert.IsTrue(adminExtensionsPage.ElementPresent(By.XPath("//tr[td/span[text() = '" + _adminExtensionNameToInstall + "']]")), "The Extension name is not present in the list"); }