public void ByRemoveLineTest() { this.SchoolNet().LoadWebPage(); int index = 0; string uniqueId = "ctl01"; AnswerLineItem form = new AnswerLineItem(index, uniqueId, ItemType.Matching); Assert.AreEqual("By.Id: ctl00_MainContent_EditTestItemControl_choicesRepeator_" + uniqueId + "_lnkDeleteChoice", form.ByRemoveLine().ToString(), "ByRemoveLine locator matches"); form = new AnswerLineItem(index, uniqueId, ItemType.MultipleChoice); Assert.AreEqual("By.Id: ctl00_MainContent_EditTestItemControl_RepeaterAnswers_" + uniqueId + "_LinkButton1", form.ByRemoveLine().ToString(), "ByRemoveLine locator matches"); form = new AnswerLineItem(index, uniqueId, ItemType.TrueFalse); Assert.AreEqual("By.Id: ", form.ByRemoveLine().ToString(), "ByRemoveLine locator matches"); form = new AnswerLineItem(index, uniqueId, ItemType.InlineResponse); Assert.AreEqual("By.Id: ctl00_MainContent_EditTestItemControl_RepeaterClozeStemAnswers_" + uniqueId + "_DelClozeChoice", form.ByRemoveLine().ToString(), "ByRemoveLine locator matches"); form = new AnswerLineItem(index, uniqueId, ItemType.DragAndDrop); Assert.AreEqual("By.CssSelector: ", form.ByRemoveLine().ToString(), "ByRemoveLine locator matches"); form = new AnswerLineItem(index, uniqueId, ItemType.HotSpotSingleSelection); Assert.AreEqual("By.CssSelector: #tblAnswers tbody[ng-repeat='answer in TestItem.Answers']:nth-of-type(" + index + ") .pull-right > a", form.ByRemoveLine().ToString(), "ByRemoveLine locator matches"); }