public void ByContentEditTest() { this.SchoolNet().LoadWebPage(); int index = 0; string uniqueId = "ctl01"; QuestionAnswerContent form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AnswerChoice, ItemType.MultipleChoice); Assert.AreEqual("By.Id: divAnswerContent" + index, form.ByContentEdit().ToString(), "ByContentEdit locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AnswerChoice, ItemType.TrueFalse); Assert.AreEqual("By.Id: divAnswerContent" + index, form.ByContentEdit().ToString(), "ByContentEdit locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AnswerChoice, ItemType.InlineResponse); Assert.AreEqual("By.Id: ctl00_MainContent_EditTestItemControl_RepeaterClozeStemAnswers_" + uniqueId + "_txtAnswerContent", form.ByContentEdit().ToString(), "ByContentEdit locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AnswerChoice, ItemType.DragAndDrop); Assert.AreEqual("By.CssSelector: .tab-pane.ng-scope.active .listChoices li[data-ng-repeat='tabChoice in tab.AllChoices']:nth-of-type(" + index + ") div[data-ng-bind-html]", form.ByContentEdit().ToString(), "ByContentEdit 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 + ") ..itemContent > #divanswer0A", form.ByContentEdit().ToString(), "ByContentEdit locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.AvailableChoice, ItemType.Matching); Assert.AreEqual("By.Id: divMatchChoiceContent" + index, form.ByContentEdit().ToString(), "ByContentEdit 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 + ") .itemContent", form.ByContentEdit().ToString(), "ByContentEdit locator matches"); form = new QuestionAnswerContent("T", index, uniqueId, ContentType.QuestionStem, ItemType.TrueFalse); Assert.AreEqual("By.Id: divMatchStemContent" + index, form.ByContentEdit().ToString(), "ByContentEdit 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 + ") .itemContent", form.ByContentEdit().ToString(), "ByContentEdit locator matches"); }