public void Test008_DragAndDropModuleToLeftPane(string pageName, string moduleNameOnPage, string newLocationID) { Modules module = new Modules(_driver); var fiModuleNameOnPage = module.GetType().GetField(moduleNameOnPage); moduleNameOnPage = (string)fiModuleNameOnPage.GetValue(null); var fiNewLocationID = module.GetType().GetField(newLocationID); newLocationID = (string)fiNewLocationID.GetValue(null); Trace.WriteLine(BasePage.RunningTestKeyWord + "'Drag and drop a Module'"); BlankPage blankPage = new BlankPage(_driver); blankPage.OpenUsingUrl(_baseUrl, pageName); blankPage.SetPageToEditMode(pageName); string moduleNumber = blankPage.WaitForElement(By.XPath(moduleNameOnPage + "/a")).GetAttribute("name"); module.MoveModuleUsingDragAndDrop(moduleNumber, moduleNameOnPage, newLocationID); blankPage.OpenUsingUrl(_baseUrl, pageName); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Module new location: " + newLocationID + moduleNameOnPage); Assert.IsTrue(blankPage.ElementPresent(By.XPath(newLocationID + moduleNameOnPage)), "Module is not found"); }