public void AddExistingModuleWithCopy(Dictionary<string, Modules.ModuleIDs> modulesDescription, string pageName) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add Existing Module, Make a Copy'"); var blankPage = new BlankPage(_driver); blankPage.OpenUsingUrl(_baseUrl, pageName); var module = new Modules(_driver); module.OpenExistingModulePanelUsingControlPanel(); string moduleNameOnPage = modulesDescription["ContactUsModule"].IdWhenOnPage; string moduleNameOnBanner = modulesDescription["ContactUsModule"].IdWhenOnBanner; string locationOnPage = Modules.LocationDescription["ContentPane"].IdWhenOnPage; blankPage.FolderSelectByValue(By.XPath(Modules.PageDropDownId), "Home"); blankPage.WaitForElement(By.XPath(Modules.List + "[1]")); blankPage.CheckBoxCheck(By.XPath(Modules.MakeACopyCheckbox)); module.AddNewModuleUsingMenu(moduleNameOnBanner, moduleNameOnPage, "ContentPane"); string moduleNumber = blankPage.WaitForElement(By.XPath(locationOnPage + "/div[last()]/a")).GetAttribute("name"); blankPage.OpenUsingUrl(_baseUrl, pageName); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Module location: " + locationOnPage + moduleNameOnPage); Assert.IsTrue( blankPage.ElementPresent( By.XPath(locationOnPage + moduleNameOnPage + "/a[@name='" + moduleNumber + "']")), "Module is not found"); }