public void Test0013_AddExistingModuleWithCopy(string pageName) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add Existing Module, Make a Copy'"); BlankPage blankPage = new BlankPage(_driver); blankPage.OpenUsingUrl(_baseUrl, pageName); Modules module = new Modules(_driver); module.OpenExistingModulePanelUsingControlPanel(); blankPage.LoadableSelectByValue(By.XPath(Modules.PageDropDownId), "Home"); blankPage.WaitForElement(By.XPath(Modules.List + "[1]")); blankPage.CheckBoxCheck(By.XPath(Modules.MakeACopyCheckbox)); module.AddNewModuleUsingMenu(Modules.ContactUsModule, Modules.HtmlProModuleOnPage, Modules.ContentPaneOption, Modules.ContentPaneID); string moduleNumber = blankPage.WaitForElement(By.XPath(Modules.ContentPaneID + "/div[last()]/a")).GetAttribute("name"); blankPage.OpenUsingUrl(_baseUrl, pageName); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Module location: " + Modules.ContentPaneID + Modules.ContactUsModule); Assert.IsTrue(blankPage.ElementPresent(By.XPath(Modules.ContentPaneID + Modules.HtmlProModuleOnPage + "/a[@name='" + moduleNumber + "']")), "Module is not found"); }