public void ByContentRemoveTest() { this.SchoolNet().LoadWebPage(); int index = 0; string uniqueId = "ctl01"; QuestionAnswerContent form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AnswerChoice, ItemType.MultipleChoice); Assert.AreEqual("By.Id: ctl00_MainContent_EditTestItemControl_RepeaterAnswers_" + uniqueId + "_LinkButton1", form.ByContentRemove().ToString(), "ByContentRemove locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AnswerChoice, ItemType.TrueFalse); Assert.AreEqual("By.Id: ctl00_MainContent_EditTestItemControl_RepeaterAnswers_" + uniqueId + "_LinkButton1", form.ByContentRemove().ToString(), "ByContentRemove locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AnswerChoice, ItemType.InlineResponse); Assert.AreEqual("By.Id: ctl00_MainContent_EditTestItemControl_RepeaterClozeStemAnswers_" + uniqueId + "_DelClozeChoice", form.ByContentRemove().ToString(), "ByContentRemove locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AnswerChoice, ItemType.DragAndDrop); Assert.AreEqual("By.CssSelector: ", form.ByContentRemove().ToString(), "ByContentRemove locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AnswerChoice, ItemType.HotSpotSingleSelection); Assert.AreEqual("By.CssSelector: #tblAnswers tbody[ng-repeat='answer in TestItem.Answers']:nth-of-type(" + index + ") .pull-right > a", form.ByContentRemove().ToString(), "ByContentRemove locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AvailableChoice, ItemType.Matching); Assert.AreEqual("By.Id: ctl00_MainContent_EditTestItemControl_choicesRepeator_" + uniqueId + "_lnkDeleteChoice", form.ByContentRemove().ToString(), "ByContentRemove locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AvailableChoice, ItemType.DragAndDrop); Assert.AreEqual("By.CssSelector: .listChoices li[data-ng-repeat='choice in TestItem.Choices']:nth-of-type(" + index + ") a", form.ByContentRemove().ToString(), "ByContentRemove locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.QuestionStem, ItemType.TrueFalse); Assert.AreEqual("By.Id: ctl00_MainContent_EditTestItemControl_stemRepeator_" + uniqueId + "_lnkDeleteStem", form.ByContentRemove().ToString(), "ByContentRemove locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.TargetContainer, ItemType.TrueFalse); Assert.AreEqual("By.CssSelector: .listChoices li[data-ng-repeat='container in TestItem.Containers']:nth-of-type(" + index + ") a", form.ByContentRemove().ToString(), "ByContentRemove locator matches"); }