/// <summary> /// drag the answer and drop it on the question /// </summary> /// <param name="dragAnswer">the answer to drag</param> /// <param name="dropQuestion">the question to drop on</param> public void DragAnswerAndDropOnQuestion(DraggableLineItem dragAnswer, DroppableLineItem dropQuestion) { dropQuestion.GetQuestionChoiceList().Add(dragAnswer); dragAnswer.QuestionChoice.Wait(3); dropQuestion.AnswerChoice.Wait(3); //actionbuilder code to drag and drop ActionsWrapper actions = new ActionsWrapper(); actions.DragAndDrop(dragAnswer.QuestionChoice, dropQuestion.AnswerChoice).Build().Perform(); }
/// <summary> /// click the answers and click on the questions /// </summary> public void ClickAnswersAndClickOnQuestions() { QuestionChoices.SetQuestionChoiceList(); AnswerChoices.SetAnswerChoiceList(); foreach (var question in Data.QuestionList) { DroppableLineItem clickQuestion = QuestionChoices.GetQuestionLineItem(question); List <string> answerList = Data.StudentAnswerTree[question]; foreach (var answer in answerList) { DraggableLineItem clickAnswer = AnswerChoices.GetAnswerLineItem(answer); Report.Write("question: '" + question + "'; clickQuestion.Key: '" + clickQuestion.Key + "'; answer: '" + answer + "'; clickAnswer.Key: '" + clickAnswer.Key); ClickAnswerAndClickOnQuestion(clickAnswer, clickQuestion); } } }
/// <summary> /// click the answer and click on the question /// </summary> /// <param name="clickAnswer">the answer to click</param> /// <param name="clickQuestion">the question to click on</param> public void ClickAnswerAndClickOnQuestion(DraggableLineItem clickAnswer, DroppableLineItem clickQuestion) { clickQuestion.GetQuestionChoiceList().Add(clickAnswer); clickAnswer.QuestionChoice.Wait(3).Click(); clickQuestion.AnswerChoice.Wait(3).Click(); }
/// <summary> /// is the question dropped on the answer? /// </summary> /// <param name="clickQuestion">the clicked question</param> /// <param name="clickAnswer">the answer clicked on</param> public void IsQuestionDroppedOnAnswer(DraggableLineItem clickQuestion, DroppableLineItem clickAnswer) { clickAnswer.IsQuestionDroppedOnAnswer(clickQuestion); }
/// <summary> /// is the question dropped on the answer? /// </summary> /// <param name="dragQuestion">the dragged question</param> /// <param name="dropAnswer">the answer dropped on</param> public void IsQuestionDroppedOnAnswer(DraggableLineItem dragQuestion, DroppableLineItem dropAnswer) { dropAnswer.IsQuestionDroppedOnAnswer(dragQuestion); }